fix(lsp): hacky fix for neoconf lazy loading

This commit is contained in:
Micah Halter
2023-07-06 15:29:37 -04:00
parent b7160d3309
commit e1614f2518
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -85,6 +85,12 @@ M.setup = function(server)
end
local opts = M.config(server)
local setup_handler = setup_handlers[server] or setup_handlers[1]
-- HACK: set up neoconf before setting up any language servers if it's not setup
if not package.loaded["neoconf"] and utils.is_available "neoconf.nvim" then
require("neoconf").setup(utils.plugin_opts "neoconf.nvim")
end
if not vim.tbl_contains(astronvim.lsp.skip_setup, server) and setup_handler then setup_handler(server, opts) end
end
+2
View File
@@ -37,6 +37,8 @@ return {
end
return { global_settings = global_settings and string.rep("../", depth):sub(1, -2) .. global_settings }
end,
-- HACK: defer neoconf loading until after lspconfig is loaded but before servers are set up
config = function() pcall(require, "lspconfig") end, -- actual setup happens in astronvim.utils.lsp
},
{
"williamboman/mason-lspconfig.nvim",