From 0b67f2ff8ad371a66a11754c6a2ed24c808e64e4 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Sun, 25 Jun 2023 16:42:45 -0700 Subject: [PATCH] Use the FileType autocmd to start the LSP server for a buffer --- plugin/lsp.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/lsp.vim b/plugin/lsp.vim index ce9c704..d89f3ae 100644 --- a/plugin/lsp.vim +++ b/plugin/lsp.vim @@ -45,7 +45,7 @@ enddef augroup LSPAutoCmds au! - autocmd BufNewFile,BufReadPost * lsp.AddFile(expand('')->str2nr()) + autocmd BufNewFile,BufReadPost,FileType * lsp.AddFile(expand('')->str2nr()) # Note that when BufWipeOut is invoked, the current buffer may be different # from the buffer getting wiped out. autocmd BufWipeOut * lsp.RemoveFile(expand('')->str2nr()) -- 2.48.1