Neovim-from-scratch
Neovim-from-scratch copied to clipboard
lsp error with on_attach.
The error I received was:
Error detected while processing /home/xxx/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/xxx/.config/nvim/lua/user/lsp/configs.lua:16: attempt to index a boole
an value
stack traceback:
/home/xxx/.config/nvim/lua/user/lsp/configs.lua:16: in main chunk
[C]: in function 'require'
/home/xxx/.config/nvim/lua/user/lsp/init.lua:6: in main chunk
[C]: in function 'require'
/home/xxx/.config/nvim/init.lua:6: in main chunk
line 16 for me is
on_attach = require("user.lsp.handlers").on_attach,
Is there anything I can do to figure out more about this error?
Do you have cmp and the lsp source for cmp installed?
If you take a look at handlers.lua:93: It will just return nil if you don't have cmp_nvim_lsp installed, which will cause the issue in configs.lua:16.
For me this issue went away after installing cmp and its lsp source.