-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add proposed textDocument/inlayHints to protocol & client. #772
Conversation
This addresses the FR microsoft/language-server-protocol#956 And corresponds to the spec in microsoft/language-server-protocol#1249
@dbaeumer I'm guessing that as a new feature, this should all go under "proposed"? |
@sam-mccall yes, this all has to go under proposed. And it is easier to keep the markdown spec part in sync if it is part of this repository as well. Adding it to the spec can be done when we think that the proposed API has reach some stability. |
@dbaeumer Gentle ping to get this back on your radar :-) We've got a server implementation of this in clangd which is coming up to a release cycle, and are looking to add matching support in a client soon. Having the protocol landed in some form (proposed, or even just rough agreement on the protocol structure) would let us align on that. IME it's hard to rip out nonstandard extensions later especially if they're "richer" than the standard replacement. |
I was out on vacation. I will try to find out where VS Code is with that. What we can do is to add something that mirrors VS Code's proposed API. But then the proposed API might change if the VS Code API changes. |
I followed up with the VS Code team and they expect changes in the realm of inlay Hints. Given that and the fact that the PR doesn't contain any server implementation I will currently not merge it. @sam-mccall are you willing to add the server code as well? Otherwise it is hard to write tests for this. |
@dbaeumer thanks for following up. I'm willing to add node server code & tests if you think this it's likely it can be merged in that case. |
@sam-mccall I would propose to wait for now and see what happens in VS Code. |
I'd like to second this issue.
|
VS Code will finalize the API this month. After that I think it is a good time to look into the PR again. |
@dbaeumer Gentle reminder: microsoft/vscode#16221 (comment) is now closed. |
Anyone interested in preparing a new PR or updating this one? Based on reviews we did we changed the VS Code API to allow more features (like navigating on inlay hints) which resulted in changes in the API. |
I can take another pass at it but probably not for a few weeks. If someone else wants to jump on it before then, please do! |
A first draft version is available here:
|
@dbaeumer Thanks for the nice work, just a question:
In the proposed LSP API, the range parameter of |
Yeah,
|
Another slight inconsistency is |
I called it In general all request are singular. The semantic token one slipped in and it was too late to correct it since it already moved out of proposed and I didn't want to break it. |
If we choose range we could make it consistent since inline values is still proposed. |
OK. We will use range since a client can ask for a range that is not the viewPort. |
I will close the PR. The feature has shipped in 3.17 |
This addresses the FR microsoft/language-server-protocol#956
And corresponds to the spec in microsoft/language-server-protocol#1249