diff --git a/dot-config/vim/init.vim b/dot-config/vim/init.vim index d7b3a69..e2974e6 100644 --- a/dot-config/vim/init.vim +++ b/dot-config/vim/init.vim @@ -105,7 +105,7 @@ import "./statusline.vim" statusline.Init() import "./lsp.vim" -lsp.LazyConfigure() +lsp.Configure() set formatexpr=lsp#lsp#FormatExpr() set keywordprg=:LspHover diff --git a/dot-config/vim/lsp.vim b/dot-config/vim/lsp.vim index 3d2a361..9a1c804 100644 --- a/dot-config/vim/lsp.vim +++ b/dot-config/vim/lsp.vim @@ -140,13 +140,6 @@ def ListMissingServers(argLead: string, cmdLine: string, cursorPos: number): lis return MissingServers()->mapnew((_, server): string => server.name) enddef -export def LazyConfigure(): void - augroup lspLazyConfigure - autocmd! - autocmd VimEnter * ++once Configure() - augroup END -enddef - export def Configure(): void # We have to use final rather than const because LspAddServer() assumes it can # modify the dicts it gets, rather than making a fresh copy to mess with. @@ -154,8 +147,8 @@ export def Configure(): void if len(lspServers) != len(installedServers) echo $'{len(lspServers) - len(installedServers)} language servers are configured, but not installed. You may want to run :LspInstall.' endif - g:LspAddServer(installedServers) - g:LspOptionsSet(lspOptions) + g:lsp#lsp#AddServer(installedServers) + g:lsp#options#OptionsSet(lspOptions) enddef export def Install(...serverNames: list): void