Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I configure Visual Studio Code's Outline view to show what is public/private?

Can I configure Visual Studio Code to show in the Outline panel what the members and methods are in the sense of Public and Private? If so, how?

IntelliJ would show a green or a red marker to indicate which were private and which are publicly accessible methods and properties.

like image 601
Elijah Avatar asked Dec 05 '25 03:12

Elijah


1 Answers

I suppose you theoretically could achieve this in an extension by using the detail property of DocumentSymbol, which I think is what shows to the right of the name in the Outline View, but the extension providing language support would need to actually do that (so I guess the more practical answer for someone who doesn't want to go writing a language support extension or forking one would be to go check for an existing feature-request issue ticket or create one in the specific extension's issue tracker). If you want something that looks nicer than that / looks different / uses an icon instead of text / is differently positioned, then you'd need to file an issue ticket against VS Code itself. There's also a kind property, but its type, SymbolKind doesn't have any sort of modifier mechanism.

Note that the FileDecoration part of the extension API has a badge property, which I think can affect the Explorer View. An extension could also just contribute its own type of subview to the Explorer View which does whatever it wants.

like image 62
starball Avatar answered Dec 10 '25 21:12

starball



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!