Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Error whenever I open a file that is not supported by null-ls #355

Discussion options

You must be logged in to vote

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:

Error detected while processing CursorHold Autocommands for "*":
method textDocument/documentHighlight is not supported by any of the servers registered for the current b
uffer

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 in on_attach:

local on_attach = function(client)
    if client.resolved_capabilities.document_highlight then
        vim.cmd("autocmd CursorHold <buffer> lua…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@augustocdias
Comment options

Answer selected by augustocdias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants