From: Yegappan Lakshmanan Date: Sun, 25 Jun 2023 23:42:45 +0000 (-0700) Subject: Use the FileType autocmd to start the LSP server for a buffer X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=0b67f2ff8ad371a66a11754c6a2ed24c808e64e4;p=vim-lsp.git Use the FileType autocmd to start the LSP server for a buffer --- 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())