Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SomeoneToIgnore
Copy link

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

Since 3.16.0 the client can signal that it can resolve more properties lazily. This is done using the completionItem#resolveSupport client capability which lists all properties that can be filled in during a ‘completionItem/resolve’ request. All other properties (usually sortText, filterText, insertText and textEdit) must be provided in the textDocument/completion response and must not be changed during resolve.

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.

@SomeoneToIgnore
Copy link
Author

To be more precise, textEdits is something we need to remove to fix #72

but given the overall situation, any "fancy" visualization of completion items needs detail and any hover request would also need documentation.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

textEdit completion item property is not resolved lazily
1 participant