microsoft / microsoft/language-server-protocol
The specification should maybe say where code lenses are shown in the client
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
At the moment, the specification says nothing about how code lenses are displayed. In all the existing implementations that I know of, code lenses are displayed inline in the code using the title of the command to provide the text. But there is not agreement about where they are displayed! For example, VSCode shows them above the target line, and recent lsp-mode shows them at the end of the target line.
This is quite important: since code lenses appear in the code, how they are interpreted by the user depends on where they appear!
For example, the Haskell language server provides code lenses that show the type signature for functions that do not have one, inserting them on click. This works perfectly when the code lenses appear above the line, but look very weird if they appear at the end.
So it would be good if the specification could provide some guidance for server implementors. Even if the guidance is "you should not make any assumptions about where or whether code lenses are displayed" that would be very useful: then we would know that what we are doing in HLS is making wrong assumptions and we should stop! Basically I would like to know whether it's HLS or the lsp-mode maintainers who are doing something wrong :)
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
Read the existing code-lens portion of the language server protocol specification and the discussion in this issue, including the VSCode, lsp-mode, and Haskell language server examples. Determine what guidance the specification should give about code-lens placement or implementation assumptions; done means the specification records an agreed, unambiguous position.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100