updates for lsp-installer

neovim_0.6
ray-x 3 years ago
parent 87f4c2b664
commit b936cbb48d

@ -27,7 +27,7 @@ return {
if _NgConfigValues.lsp_installer == true then
local has_lspinst, lspinst = pcall(require, "lsp_installer")
log('lsp_installer', has_lspinst)
log('lsp_installer installed', has_lspinst)
if has_lspinst then
lspinst.setup()
local configs = require "lspconfig/configs"

@ -2,6 +2,8 @@
local log = require"navigator.util".log
local trace = require"navigator.util".trace
local uv = vim.loop
local warn = require'navigator.util'.warn
_NG_Loaded = {}
_LoadedFiletypes = {}
@ -276,6 +278,7 @@ if config.lsp_installer == true then
servers = srvs
end
end
log(servers)
end
if config.lsp.disable_lsp == 'all' then
@ -372,6 +375,15 @@ local function lsp_startup(ft, retry, user_lsp_opts)
end
for _, lspclient in ipairs(servers) do
-- check should load lsp
if type(lspclient) == 'table' then
if lspclient.name then
lspclient = lspclient.name
else
warn("incorrect set for lspclient", vim.inspect(lspclient))
goto continue
end
end
if user_lsp_opts[lspclient] ~= nil and user_lsp_opts[lspclient].filetypes ~= nil then
if not vim.tbl_contains(user_lsp_opts[lspclient].filetypes, ft) then
trace("ft", ft, "disabled for", lspclient)
@ -389,6 +401,7 @@ local function lsp_startup(ft, retry, user_lsp_opts)
end
local default_config = {}
log(lspclient)
if lspconfig[lspclient] == nil then
print("lspclient", lspclient, "no longer support by lspconfig, please submit an issue")
goto continue

Loading…
Cancel
Save