diff options
Diffstat (limited to 'lua')
-rw-r--r-- | lua/core/galaxyline.lua | 3 | ||||
-rw-r--r-- | lua/utils/init.lua | 26 |
2 files changed, 1 insertions, 28 deletions
diff --git a/lua/core/galaxyline.lua b/lua/core/galaxyline.lua index b2325b19..d3f9342b 100644 --- a/lua/core/galaxyline.lua +++ b/lua/core/galaxyline.lua @@ -203,7 +203,6 @@ table.insert(gls.right, { local function get_attached_provider_name(msg) msg = msg or "LSP Inactive" local buf_clients = vim.lsp.buf_get_clients() - local utils = require "utils" if next(buf_clients) == nil then return msg end @@ -215,7 +214,7 @@ local function get_attached_provider_name(msg) table.insert(buf_client_names, client.name) end end - utils.list_extend_unique(buf_client_names, null_ls_providers) + vim.list_extend(buf_client_names, null_ls_providers) return table.concat(buf_client_names, ", ") end diff --git a/lua/utils/init.lua b/lua/utils/init.lua index 8cfd2790..b27643ac 100644 --- a/lua/utils/init.lua +++ b/lua/utils/init.lua @@ -113,32 +113,6 @@ function utils.get_active_client_by_ft(filetype) return nil end ---- Extends a list-like table with the unique values of another list-like table. ---- ---- NOTE: This mutates dst! ---- ---@see |vim.tbl_extend()| ---- ---@param dst list which will be modified and appended to. ---@param src list from which values will be inserted. ---@param start Start index on src. defaults to 1 ---@param finish Final index on src. defaults to #src ---@returns dst -function utils.list_extend_unique(dst, src, start, finish) - vim.validate { - dst = { dst, "t" }, - src = { src, "t" }, - start = { start, "n", true }, - finish = { finish, "n", true }, - } - for i = start or 1, finish or #src do - if not vim.tbl_contains(dst, src[i]) then - table.insert(dst, src[i]) - end - end - return dst -end - function utils.unrequire(m) package.loaded[m] = nil _G[m] = nil |