Closed bpingris closed 2 weeks ago
tbh I have no idea why that option doesn’t work.
I’m not sure if autotrigger
is meant to be used for enabling autocompletion.
You can create an issue in neovim repo and if so, can you mention this issue so I can follow that?
I didnt take the time to fill an issue on the nvim repo, however I think the way nvim lsp completion works is with the .
in my case when writing inside ts or lua files autocomplete only shows up automatically after the .
, I guess this is based on the lsp specifications for when it should pop.
it even triggers with I had a wrong<space>
in lua file, making editing in lua impossible without being harassed by the completion menu ☹️completeopt
setting
interesting, we can modify the trigger characters, for instance here are the ones for lua:
{ "\t", "\n", ".", ":", "(", "'", '"', "[", ",", "#", "*", "@", "|", "=", "-", "{", " ", "+", "?" }
and how to update them:
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client then
vim.print(client.server_capabilities.completionProvider.triggerCharacters)
client.server_capabilities.completionProvider.triggerCharacters = {':', '.'}
end
If the document is still lack in v0.11 release, I’ll make a issue in Neovim repo
Hi!
it's not an issue with your configuration but maybe you have some extra knowledge to help me add autocompletion!
I've set up the completion like in your config, only setting the
autotrigger
option totrue
unfortunately I don't have the completion showing up when editing files, if I call the
vim.lsp.completion.trigger
function the autocomplete worksdo you know by any chance if I need to set up something else to have the autocompletion working automatically while writing in the buffer? this [documentation](https://neovim.io/doc/user/lsp.html#vim.lsp.completion.enable()) from neovim does not mention anything else, I think