|
|
@ -117,7 +117,14 @@ gls.right[1] = {
|
|
|
|
provider = function()
|
|
|
|
provider = function()
|
|
|
|
local clients = vim.lsp.get_active_clients()
|
|
|
|
local clients = vim.lsp.get_active_clients()
|
|
|
|
if next(clients) ~= nil then
|
|
|
|
if next(clients) ~= nil then
|
|
|
|
|
|
|
|
local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
|
|
|
|
|
|
|
|
for _, client in ipairs(clients) do
|
|
|
|
|
|
|
|
local filetypes = client.config.filetypes
|
|
|
|
|
|
|
|
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
|
|
|
return " " .. " " .. " LSP "
|
|
|
|
return " " .. " " .. " LSP "
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
return ""
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return ""
|
|
|
|
return ""
|
|
|
|
end
|
|
|
|
end
|
|
|
|