eclipse-lsp4e / eclipse-lsp4e/lsp4e
Programmatic way to ignore language server capabilities
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 85
- Forks
- 69
- Avg merge
- 8h 33m
- Merged PRs (30d)
- 6
Description
As language servers announce capabilities, LSP4E makes use of them without carring if there's even a need for them.
For example, say there's no need for inlay hints (actually they are an unwanted intrusion). There's no way to stop LSP4E from making textDocument/inlayHint requests from the client side, in spite of the server announcing that capability. What happens right now with several language servers (like JavaScript/TypeScript) is that they understand some configuration options for these hints and will only provide a filtered list of them in the textDocument/inlayHint replys. If the client disables by configuration all hints, LSP4E keeps making these textDocument/inlayHint requests only to receive empty responses. This is a waste and, what is worse, it is impossible to use this workaround with language servers that do not have settings for the reported inlay hints.
So, what I am kindly asking for is an API enrichment that would allow clients using LSP4E to inhibit/filter out/ignore certain capabilities that the language servers announce, as if they weren't announced at all. My issue is with the inlay hints, but others might want other unneeded functionality eliminated altogether.
Contributor guide
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 org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/inlayhint/InlayHintProvider.java and trace how announced language-server capabilities lead to requests. Review the surrounding capability-handling API and determine how clients could suppress selected capabilities, including inlay hints. Done means the API supports client-side filtering without requests for suppressed capabilities and the behavior is covered by tests, though no test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100