When I try to active completion-nvim in my init.lua with the on_attach function, I get a bunch of errors.
Error running config for completion-nvim: ...ite/pack/packer/start/completion-nvim/lua/completion.lua:251: bad argument #1 to 'ipairs' (table expected, got nil)
disable_filetypes which is returned by get_options is nil the moment ipairs is called. I tried to manually edit the file and add disable_filetypes = disable_filetypes or {} at line 250 but I got basically the same error elsewhere.
Error running config for completion-nvim: ...ite/pack/packer/start/completion-nvim/lua/completion.lua:266: bad argument #1 to 'len' (string expected, got nil)
When I try to active
completion-nvim
in myinit.lua
with theon_attach
function, I get a bunch of errors.If we look at the offending line:
https://github.com/nvim-lua/completion-nvim/blob/139fb6cfbd9f7384a5489d3e4afdacb8ed977ab0/lua/completion.lua#L246-L255
disable_filetypes
which is returned byget_options
isnil
the momentipairs
is called. I tried to manually edit the file and adddisable_filetypes = disable_filetypes or {}
at line 250 but I got basically the same error elsewhere.which is basically the same error.
https://github.com/nvim-lua/completion-nvim/blob/139fb6cfbd9f7384a5489d3e4afdacb8ed977ab0/lua/completion.lua#L265-L270
string.len()
is gettingnil
as its argument.My testing minimal init.lua
(literally my one-line
init.lua
created in a temporary home directory)Expected behavior I expect not to get errors when I call
on_attach
. Perhapsget_options
should handle missing options better (?)