Skip to content

wraith13/bracket-lens-vscode

Repository files navigation

Bracket Lens for VS Code

Visual Studio Marketplace installs rating

Show bracket header on closing bracket.

⚠ Significant performance issues have been identified in combination with VS Code v1.52.0. Set the default value of bracketLens.mode to on-save until this issue is resolved.

Features

Displays the text in the header part of the scope after the closing brace.

Screenshot

Tutorial

0. ⬇️ Install Bracket Lens

Show extension side bar within VS Code(Mac:Command+Shift+X, Windows and Linux: Ctrl+Shift+X), type Bracket Lens and press Enter and click Install.

1. 👉 Show bracket header on closing bracket

Open the source code file for a symbol bracket type language like TypeScript. Information is automatically displayed after the closing brace.

2. 🔧 Next step

Please see Notes. You can change settings. And you can edit keyboard shortcuts by keybindings.json.

Enjoy!

Commands

  • Bracket Lens: Toggle Mute : Mute Bracket Lens for the text editor in focus. Execute this command again to unmute.
  • Bracket Lens: Toggle Mute All : Mute Bracket Lens for all text editors. Execute this command again to unmute.
  • Bracket Lens: Update Brackets : You will often need to run this command in manual mode.
  • Bracket Lens: Report Profile : Report a profile.

Extension Settings

This extension contributes the following settings by settings.json( Mac: Command+,, Windows / Linux: File -> Preferences -> User Settings ):

  • bracketLens.mode: Brackets Lens operating mode.
  • bracketLens.debug: Debug mode.
  • bracketLens.color: The color of the bracket header that appears after the closing bracket.
  • bracketLens.prefix: Bracket header prefix.
  • bracketLens.unmatchBracketsPrefix: Bracket header prefix when unmatch brackets.
  • bracketLens.line: Include line number in bracket header prefix.
  • bracketLens.maxBracketHeaderLength: Bracket header length than this value are displayed with the tail omitted. ( not include prefix )
  • bracketLens.minBracketScopeLines: The bracket header is displayed only when the number of lines in the bracket scope is greater than or equal to this value. ( include bracket lines )
  • bracketLens.languageConfiguration: Language parsing settings.

Notes

For users with language syntax like TypeScript

Fortunately, this extension will probably work generally comfortably in the symbol bracktes type language without any special configuration.

Even for this type of language, details may require the setting of bracketLens.languageConfiguration. I would like to accept it as the default setting if you can tell me the setting information in the issue or pull request for other users in your language.

For users with language syntax like Ruby

I apologize for the inconvenience, but for word bracket type languages, all word brackets must be set to bracketLens.languageConfiguration.

I would like to accept it as the default setting if you can tell me the setting information in the issue or pull request for other users in your language.

For users with language syntax like Python

Unfortunately, this extension is not useful for indented scope type languages.

If your language is this type of language, I would like to have this extension disabled in that language by default if you let us know in an issue or pull request.

Keyboard shortcut Settings

You can edit keyboard shortcuts by keybindings.json ( Mac: Code -> Preferences -> Keyboard Shortcuts, Windows / Linux: File -> Preferences -> Keyboard Shortcuts).

Command name on keybindings.json is diffarent from on Command Pallete. See below table.

on Command Pallete on keybindings.json default Keyboard shortcut
Bracket Lens: Toggle Mute bracketLens.toggleMute
Bracket Lens: Toggle Mute All bracketLens.toggleMuteAll
Bracket Lens: Update Brackets bracketLens.updateBrackets
Bracket Lens: Report Profile bracketLens.reportProfile

Release Notes

see ChangLog on marketplace or github

Support

GitHub Issues

License

Boost Software License

Download VSIX file ( for VS Code compatible softwares )

Releases · wraith13/bracket-lens-vscode

Other extensions of wraith13's work

Icon Name Description
Background Phi Colors This extension colors the background in various ways.
Blitz Provide a quick and comfortable way to change settings by quick pick based UI.
Zoom Bar Zoom UI in status bar for VS Code.

See all wraith13's expansions: https://marketplace.visualstudio.com/publishers/wraith13