fix(auto highlight): Only update highlight/position if current buffer is attached to a client
This commit is contained in:
10
lua/symbols-outline/utils/lsp_utils.lua
Normal file
10
lua/symbols-outline/utils/lsp_utils.lua
Normal 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
|
||||
Reference in New Issue
Block a user