(Go: >> BACK << -|- >> HOME <<)

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

Native LSP config should set refresh=1 when calling ncm2#complete #186

Open
wbthomason opened this issue May 25, 2020 · 0 comments
Open
Labels
bug Something isn't working

Comments

@wbthomason
Copy link

As the title mentions, the native LSP configuration needs to set refresh=1 when calling ncm2#complete, here:

vim.api.nvim_call_function('ncm2#complete', {context, context.startccol, matches})

This is because some LSP servers (e.g. https://texlab.netlify.com/) refresh possible completions on every call and do not return every completion initially, so the caching means that completion results are incomplete and do not get updated as the user continues to type.

I've made this an issue rather than a PR as I don't know how broadly true this is (i.e. other LSP servers seemed to work correctly without this change), so I'm uncertain if this ought to be a global change or something configurable per-server.

To reproduce: Use texlab with the native LSP implementation. Note that you get completions when initially typing \, but continuing to type (e.g. trying to complete \hypersetup by typing \hy, etc.) will lead to empty completions. Hitting space and backspace will refresh the completion list with correct completions.

@roxma roxma added the bug Something isn't working label Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants