In VSCode, is there a way to show the current scope or closure in the scrollbar, e.g. by a decoration or opacity change?
I’m looking for a way to see whether my find widget
matches fall within the current scope, which is often larger than screen height.
As far as I can tell, there’s nothing in settings.json
for this, but perhaps I’m searching for the wrong terms.
I’d be open to an extension, but again, unless I’m searching for the wrong thing, this doesn’t exist.
2
Answers
It looks like the answer is to do the opposite of How can I remove symbols on right scrollbar of vscode? :
settings.json
"workbench.colorCustomizations": {
"editorOverviewRuler.bracketMatchForeground"
(Overview ruler marker color for matching brackets)Or the extension
Bracket Pair Colorizer 2
(pic here: https://github.com/microsoft/vscode/issues/131078).In the scrollbar? No (not that I know of).
But at the top under the tabs it does show this information for me, but perhaps not in the way you are hoping for
Edit
Using VSCode today I thought about this and noticed that matching braces on a function will highlight in the scrollbar when clicked, as well as any search result matches. This might do what you want with no tweaks at all.