diff options
Diffstat (limited to 'lua/core/galaxyline.lua')
-rw-r--r-- | lua/core/galaxyline.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lua/core/galaxyline.lua b/lua/core/galaxyline.lua index ee0a317d..512dd78c 100644 --- a/lua/core/galaxyline.lua +++ b/lua/core/galaxyline.lua @@ -204,19 +204,23 @@ table.insert(gls.right, { local function get_attached_provider_name(msg) msg = msg or "LSP Inactive" + local buf_clients = vim.lsp.buf_get_clients() if next(buf_clients) == nil then return msg end - local buf_ft = vim.bo.filetype + local buf_client_names = {} - local null_ls_providers = require("lsp.null-ls").get_registered_providers_by_filetype(buf_ft) for _, client in pairs(buf_clients) do if client.name ~= "null-ls" then table.insert(buf_client_names, client.name) end end + + local null_ls = require "lsp.null-ls" + local null_ls_providers = null_ls.list_supported_provider_names(vim.bo.filetype) vim.list_extend(buf_client_names, null_ls_providers) + return table.concat(buf_client_names, ", ") end |