fix(lsp): hacky fix for neoconf lazy loading
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user