fix(lsp): lazy loading (#3824)

This commit is contained in:
LostNeophyte 2023-02-07 17:30:14 +01:00 committed by GitHub
parent 24d8780d73
commit 98fb64764f
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 9 deletions

View file

@ -110,14 +110,6 @@ function M.setup()
require("nlspsettings").setup(lvim.lsp.nlsp_settings.setup)
end)
pcall(function()
require("mason-lspconfig").setup(lvim.lsp.installer.setup)
-- automatic_installation is handled by lsp-manager
local settings = require "mason-lspconfig.settings"
settings.current.automatic_installation = false
end)
require("lvim.lsp.null-ls").setup()
autocmds.configure_format_on_save()

View file

@ -9,6 +9,13 @@ local core_plugins = {
{
"williamboman/mason-lspconfig.nvim",
cmd = { "LspInstall", "LspUninstall" },
config = function()
require("mason-lspconfig").setup(lvim.lsp.installer.setup)
-- automatic_installation is handled by lsp-manager
local settings = require "mason-lspconfig.settings"
settings.current.automatic_installation = false
end,
lazy = true,
dependencies = "mason.nvim",
},
@ -122,7 +129,15 @@ local core_plugins = {
vim.opt.rtp:prepend(path) -- treesitter needs to be before nvim's runtime in rtp
require("lvim.core.treesitter").setup()
end,
cmd = { "TSInstall", "TSUninstall", "TSUpdate", "TSInstallInfo", "TSInstallSync", "TSInstallFromGrammar" },
cmd = {
"TSInstall",
"TSUninstall",
"TSUpdate",
"TSUpdateSync",
"TSInstallInfo",
"TSInstallSync",
"TSInstallFromGrammar",
},
event = "User FileOpened",
},
{