summaryrefslogtreecommitdiff
path: root/lua/core/galaxyline.lua
diff options
context:
space:
mode:
authorLuc Sinet <[email protected]>2021-08-13 22:32:56 +0200
committerGitHub <[email protected]>2021-08-14 01:02:56 +0430
commit70d139ac2771fac9b072aaebe505f9ac77480b2a (patch)
treef914460477982486f20bb00676f8a36c89618635 /lua/core/galaxyline.lua
parent53869f00be7eda020088342e6e1a160ef5fc2a53 (diff)
[Refactor/Bugfix] Improve null ls handler (#1277)
Diffstat (limited to 'lua/core/galaxyline.lua')
-rw-r--r--lua/core/galaxyline.lua8
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