-
Notifications
You must be signed in to change notification settings - Fork 52
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
Make LSP completions resolve capabilities more spec-compliant #75
Make LSP completions resolve capabilities more spec-compliant #75
Conversation
To be more precise, but given the overall situation, any "fancy" visualization of completion items needs I have zero knowledge of the language and the editor, so feel free to update the properties correspondingly, if you're sure things are working with these capabilities. |
Reason for closing would be appreciated. The situation (from rust-analyzer's side at least) seems to be too fluid, with a mix of new features, changes, possible reverts, and possible fixes all being involved. I applied your change here when this was submitted and stuck with a working rust-nightly and neovim-git versions until things move into a known good state. |
The main reason to close this is 0 activity on this PR for around a month — either I did something wrong and no one wants to comment this, or it's not needed to the repository. Otherwise, rust-analyzer's source tree in In Apart from that, rust-lang/rust-analyzer#18653 should be fixing the last of the issues related to the new resolve approach, but time will tell. |
I'm really sorry. I completely overlooked this. By the way, I don't understand this whole issue at all. In any case, I've never heard of this issue outside of rust-analyzer, so I'm hesitant to implement this fix. |
It's more a spec interpretation thing, I've quoted the excerpt in the OP: when certain item is added to Apparently, no other server omits r-a could return it back but turns out all other editors are managing their resolve capabilities better and are either able to resolve @hrsh7th , can you confirm that this LSP client does send |
My understanding
Is this understanding correct? |
All but the last bullet seems correct: |
Yes. I understand now. Your PR is correct. But we should follow VSCode so we should specify only |
Here, my tiny knowledge of nvim is over and I'm not sure what is a good advice: VSCode's list seems reasonable, I'd also add The only concern I have is about resolving completions.movAdding |
In fact, it seems that we should specify properties that are not used until the item is selected or confirmed. In other words, it seems dangerous to specify sortText or filterText. (This is because they are used to filter and sort all items in the list.) Could you remove Ah, sorry. Please restore |
I cannot reopen the PR unfortunately, but will create another one with the notes, thank you for the discussion. |
Closes #72
Part of rust-lang/rust-analyzer#18504
rust-analyzer started to be more spec-compliant when it comes to completion resolve:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion
So, if the editor declares a completion resolve support for the
documentation
, rust-analyzer as a server can omit it in the initial response and now it does so.