mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-30 22:59:22 +02:00
feat: multiple enhancements to lvim-reload (#2054)
This commit is contained in:
parent
68cdb62f87
commit
307db8936b
4 changed files with 64 additions and 32 deletions
|
@ -22,11 +22,12 @@ function M.get_active_clients_by_ft(filetype)
|
|||
end
|
||||
|
||||
function M.get_client_capabilities(client_id)
|
||||
local client
|
||||
if not client_id then
|
||||
local buf_clients = vim.lsp.buf_get_clients()
|
||||
for _, buf_client in ipairs(buf_clients) do
|
||||
for _, buf_client in pairs(buf_clients) do
|
||||
if buf_client.name ~= "null-ls" then
|
||||
client_id = buf_client.id
|
||||
client = buf_client
|
||||
break
|
||||
end
|
||||
end
|
||||
|
@ -36,8 +37,6 @@ function M.get_client_capabilities(client_id)
|
|||
return
|
||||
end
|
||||
|
||||
local client = vim.lsp.get_client_by_id(tonumber(client_id))
|
||||
|
||||
local enabled_caps = {}
|
||||
for capability, status in pairs(client.resolved_capabilities) do
|
||||
if status == true then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue