fix: show all lsp of mulit-lsps workspace
This commit is contained in:
parent
aabf8ca225
commit
d66c000d48
@ -149,13 +149,18 @@ end
|
|||||||
|
|
||||||
M.LSP_status = function()
|
M.LSP_status = function()
|
||||||
local clients = vim.lsp.get_active_clients()
|
local clients = vim.lsp.get_active_clients()
|
||||||
local name = false
|
local names = {}
|
||||||
for _, client in ipairs(clients) do
|
for _, client in ipairs(clients) do
|
||||||
if client.attached_buffers[vim.api.nvim_get_current_buf()] then
|
if client.attached_buffers[vim.api.nvim_get_current_buf()] then
|
||||||
name = client.name
|
table.insert(names, client.name)
|
||||||
break
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local name = false
|
||||||
|
if names ~= {} then
|
||||||
|
name = table.concat(names, '/')
|
||||||
|
end
|
||||||
|
|
||||||
local content = name and " LSP ~ " .. name .. " " or false
|
local content = name and " LSP ~ " .. name .. " " or false
|
||||||
return content and ("%#St_LspStatus#" .. content) or ""
|
return content and ("%#St_LspStatus#" .. content) or ""
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user