microsoft / microsoft/language-server-protocol
For DocumentSymbol, allow passing also Location optionally, not only Range
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
Currently, DocumentSymbol, used in the result of Document Symbol request only contains Range, so it is only able to reference the file for which the request was sent.
I propose, that we would be able to reference other files as well, so the definition of properties range and selectionRange could change from:
range: Range;
selectionRange: Range;
to the following:
range: Range | Location;
selectionRange: Range | Location;
We are developing a language server for High Level Assembler, where we would quite benefit from such feature. There is a construct, which makes symbols that may be defined in different files related (imagine something like partial class in C#). It would be nice if the user could see all the related symbols listed in one place (the outline in VS Code), even when they are defined in different files.
What are your thoughts on this? Is there a reason why such feature was not allowed until now? Would it be worthwhile to create a pull request implementing these changes?
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 by locating the DocumentSymbol definition and the Range and Location types in the protocol specification. Review how Document Symbol responses are represented and determine the compatibility and client-impact implications of allowing both properties to reference another file. Done means the proposal has a decided design and the specification and related validation are updated accordingly.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100