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

No autocomplete #25

Open
Tylerwbrown opened this issue Mar 27, 2023 · 2 comments
Open

No autocomplete #25

Tylerwbrown opened this issue Mar 27, 2023 · 2 comments

Comments

@Tylerwbrown
Copy link

I'm not getting any autocomplete when I use this plugin, but everything else seems to work (code actions, inline errors, etc.)

vscode has the same functionality but also have autocompletion working.

I see textDocument/completion responses coming through in my log when I type in nvim, so the LSP seems to be receiving requests and responding properly, they're just not showing up in neovim.

Running 0.8.3 nvim

@ShinKage
Copy link
Collaborator

Auto completion should work out-of-the-box with any code-completion engine, refer to https://github.com/neovim/nvim-lspconfig/wiki/Autocompletion

@SlayerOfTheBad
Copy link

I think this is caused by Idris-LSP's requirement for the buffer to be saved to disk, not idris2-nvim.

It's not that auto-complete isn't working, it's that the LSP reads the data from the file, rather than the buffer, so it doesn't actually have access to what you are typing, and therefor can not suggest anything.

This can be seen with a fairly minimal file

createEmpties : {n : _} -> Vect n (Vect 0 elem_0)
createEmpties = 

if you start typing replicate, it will not give completion suggestions. However, if you type repli, write to disk (:w) and then continue typing, it will give the suggestion.

image
image

Being able to handle files not on disk is planned for Idris2-LSP, but not currently present.

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

No branches or pull requests

3 participants