microsoft / microsoft/language-server-protocol
Add visibility to SymbolInformation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
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
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SymbolInformation proposal in issue #98 and compare it with the suggested CompletionItem extension. Resolve whether the visibility enum covers the languages represented by the protocol and define the compatibility and ordering expectations before identifying the relevant protocol definitions and tests. Done means the design is agreed and both affected types are specified consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100