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

Is completionItem/resolve valid after a document change? #2060

Open
flodiebold opened this issue Nov 26, 2024 · 1 comment
Open

Is completionItem/resolve valid after a document change? #2060

flodiebold opened this issue Nov 26, 2024 · 1 comment
Milestone

Comments

@flodiebold
Copy link

As far as I can see, the specification does not explicitly forbid the following sequence:

  1. call textDocument/completion
  2. change the document, send textDocument/didChange
  3. call completionItem/resolve for one of the items returned in step 1.

In rust-analyzer, we made the assumption that completion items would not be possible to resolve after changing the document. It turns out that at least Neovim and Helix seem to change the document while the user cycles through completions, and then try to resolve the outdated completion items though. So the question is, is this a client error or does the server need to support this? If this is intended to be supported, for how long do completion items need to be resolvable? The discussion in #1802 came close to touching upon this, but as far as I see didn't answer it.

rust-lang/rust-analyzer#18547
helix-editor/helix#12119

@pascalkuthe
Copy link

pascalkuthe commented Nov 26, 2024

helix-editor/helix#12119 (comment)

helix does not change the document while cycling completions but for servers that don't support incomplete completion requsts the document ofcourses as the user keeps typing so this doesn't seem like a generally valid assertion the spec could make (if anything it can only apply to incomplete completion requests)

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

No branches or pull requests

3 participants