microsoft / microsoft/language-server-protocol
Should all server capabilities allow the corresponding dynamic registration options?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
Some, but not all, of the server capability fields in the initialize response allow providing the corresponding registration options. It's helpful to be able to do so, since the registration options type usually includes additional fields, such as the documentSelector.
Examples:
completionProviderhas typeCompletionOptionsand doesn't allowCompletionRegistrationOptionstypeDefinitionProviderhas typeTypeDefinitionOptions | TypeDefinitionRegistrationOptions
Is this just for backwards compatibility? Is there a way we could migrate the protocol to be more consistent here? It would make things simpler. For example, if you want to make use of the documentSelector capability, you can have many cases:
- Client supports dynamic registration: dynamically register
- Client does not support dynamic registration:
- Options field supports dynamic registration options: statically register
- Options field does not support dynamic registration options: give up
It's quite fiddly.
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 comparing the server capability types in the initialize response, especially completionProvider and typeDefinitionProvider, with their corresponding registration option types. Determine the backwards-compatibility constraints and whether a consistent migration is possible; done means the protocol has a decided, documented approach rather than an unresolved set of cases.
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