Skip to content

[WIP] Resolve completions within LspServer.completion() #148

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

Closed

Conversation

leungbk
Copy link

@leungbk leungbk commented May 28, 2020

This allows additionalTextEdits to be provided in the
textDocument/completion response while abiding by the guideline here:

microsoft/language-server-protocol#924

I learned of this today via emacs-lsp/lsp-mode#1713 (comment)

@rchl
Copy link
Member

rchl commented May 28, 2020

In which cases additionalTextEdits are provided for completion response?

It might be a correct fix but not sure if it's worth it as it will make the completion response really really slow (like few seconds instead of instantaneous). I've tried on this server's codebase.

@leungbk
Copy link
Author

leungbk commented May 28, 2020

In which cases additionalTextEdits are provided for completion response?

One example is when you're autocompleting a symbol not yet in the current file, and additionalTextEdits allows you to auto-import.

It might be a correct fix but not sure if it's worth it as it will make the completion response really really slow (like few seconds instead of instantaneous). I've tried on this server's codebase.

Hmm, you're right. This PR will need some additional work.

@leungbk leungbk changed the title Resolve completions within LspServer.completion() [WIP] Resolve completions within LspServer.completion() May 28, 2020
@leungbk leungbk force-pushed the resolve-completions branch from 86e2a8e to 034e3d1 Compare May 28, 2020 23:03
This allows additionalTextEdits to be provided in the
textDocument/completion response while abiding by the guideline here:

microsoft/language-server-protocol#924
@leungbk leungbk force-pushed the resolve-completions branch from 034e3d1 to 5e44a13 Compare May 29, 2020 00:45
@leungbk leungbk closed this Jul 7, 2020
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.

2 participants