From 78cc4cc7d700ea5888604d851ab7b3aa54c411f2 Mon Sep 17 00:00:00 2001 From: leafee98 Date: Fri, 15 Dec 2023 20:29:39 +0800 Subject: [PATCH] fix: lsp not autostart, fix by Buf{ReadPre,NewFile} --- lua/plugins/50-lsp.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/50-lsp.lua b/lua/plugins/50-lsp.lua index ab16958..e051f27 100644 --- a/lua/plugins/50-lsp.lua +++ b/lua/plugins/50-lsp.lua @@ -48,7 +48,8 @@ return { "hrsh7th/cmp-cmdline", "L3MON4D3/LuaSnip", }, - event = "VeryLazy", + event = { "BufReadPre", "BufNewFile" }, + cmd = { "LspInfo", "LspInstall", "LspUninstall" }, config = function (_, opts) local capabilities = require("cmp_nvim_lsp").default_capabilities()