Skip to content

Commit

Permalink
fix(neovim): prevent text/documentHighlight on non supported fts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroSuero committed Apr 16, 2024
1 parent fdbe775 commit a8e0460
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roles/neovim/files/lua/aome/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ local custom_attach = function(client, bufnr)
vim.bo.omnifunc = "v:lua.vim.lsp.omnifunc"

-- Set autocommands conditional on server_capabilities
if client.server_capabilities.documentHighlightProvider then
if
client.server_capabilities.documentHighlightProvider
and client.server_capabilities.documentHighlight
then
autocmd_clear { group = augroup_highlight, buffer = bufnr }
autocmd {
"CursorHold",
Expand Down

0 comments on commit a8e0460

Please sign in to comment.