Open
Description
I propose an addition to SymbolInformation
that allows an LS to report the visibility (private
, protected
, public
) to the client:
interface SymbolInformation {
visibility?: Visibility;
}
enum Visibility {
Private = 1,
Protected = 2,
Public = 3
}
A client can choose how he uses that information:
- it could display an icon that indicates a symbol is private
- after getting a list of symbols, it could allow the user to hide/show only public symbols
The same property could get added to CompletionItem
.
I think private, protected and public should cover all languages, or are there more modifiers in some languages?
The enum should be structured to allow something like
if (symbol.visibility >= Visibility.Protected) {
// symbol is at least protected or public
}