Error whenever I open a file that is not supported by null-ls #355
-
I'm having the following error after I open a filetype that is not supported/configured. It started after I installed null-ls.
Am I doing something wrong? Here's my null-ls config: https://github.com/augustocdias/dotfiles/blob/main/.config/nvim/lua/lsp-config.lua#L148 If I open a Edit: I've just noticed it happens with markdown too... So not only with "unsupported" files |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think the issue is your
You could either add local on_attach = function(client)
if client.resolved_capabilities.document_highlight then
vim.cmd("autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()")
end
end |
Beta Was this translation helpful? Give feedback.
I think the issue is your
document_highlight
autocommand. The error you're getting isn't descriptive due to an issue that has been fixed on Neovim master, but on 0.6.0 I get the following error:You could either add
silent!
to your autocommand to suppress the error or make it more granular, e.g. by making it buffer-local and checking the client's capabilities inon_attach
: