Open Tylerwbrown opened 1 year ago
Auto completion should work out-of-the-box with any code-completion engine, refer to https://github.com/neovim/nvim-lspconfig/wiki/Autocompletion
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.
Being able to handle files not on disk is planned for Idris2-LSP, but not currently present.
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