fix(auto highlight): Only update highlight/position if current buffer is attached to a client

This commit is contained in:
simrat39
2021-04-24 15:05:59 -07:00
parent aaae362ae8
commit 21f085cb92
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
local vim = vim
local M = {}
function M.is_buf_attached_to_lsp(bufnr)
local clients = vim.lsp.buf_get_clients(bufnr or 0)
return clients ~= nil and #clients > 0
end
return M