fix(utils): fix issue with reloading cosmic

This commit is contained in:
Matt Leong 2021-11-12 13:26:27 -08:00
parent 292ffbb2ea
commit fab66bb685

View file

@ -43,11 +43,13 @@ function M.get_active_lsp_client_names()
local buf = vim.api.nvim_get_current_buf()
-- only return attached buffers
if vim.lsp.buf_is_attached(buf, client.id) then
table.insert(client_names, i, client.name)
table.insert(client_names, client.name)
end
end
if not vim.tbl_isempty(client_names) then
table.sort(client_names)
end
return client_names
end
@ -70,6 +72,7 @@ end
function M.reload_cosmic()
unload('cosmic')
require('cosmic')
vim.cmd(':e')
end
function M.get_install_dir()