From 75a3809e15a0ecff9adc46c6cd3aaac51d99b561 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 13:52:07 +0200 Subject: [PATCH] fix(lsp): schedule_wrap setting up LSPs to work around root cause of #6456. Fixes #6456 --- lua/lazyvim/plugins/lsp/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 1984c31b..95b7385c 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -2,7 +2,7 @@ return { -- lspconfig { "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile", "BufWritePre" }, + event = "LazyFile", dependencies = { "mason.nvim", { "mason-org/mason-lspconfig.nvim", config = function() end }, @@ -118,7 +118,7 @@ return { return ret end, ---@param opts PluginLspOpts - config = function(_, opts) + config = vim.schedule_wrap(function(_, opts) -- setup autoformat LazyVim.format.register(LazyVim.lsp.formatter()) @@ -256,7 +256,7 @@ return { resolve("denols") resolve("vtsls") end - end, + end), }, -- cmdline tools and lsp servers