mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2024-12-13 13:30:41 +00:00
fix: show all lsp of mulit-lsps workspace
This commit is contained in:
parent
aabf8ca225
commit
d66c000d48
1 changed files with 8 additions and 3 deletions
|
@ -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 a new issue