]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
change order of vim-plug initialization commands
authorEnno <Konfekt@users.noreply.github.com>
Tue, 16 Jan 2024 13:00:35 +0000 (14:00 +0100)
committerGitHub <noreply@github.com>
Tue, 16 Jan 2024 13:00:35 +0000 (14:00 +0100)
I could not get omnicomplete to work when setting the options after adding the servers

doc/lsp.txt

index d7c4bbd8026cdc83d928b529f6c1310d41357e44..3c65c2bee0e0a3febfc8ee36afc37bed12bf4711 100644 (file)
@@ -416,6 +416,10 @@ LSP plugin, then you need to use the VimEnter autocmd to initialize the
 language server and to set the language server options.  For example: >
 
     vim9script
+
+    var lspOpts = {autoHighlightDiags: true}
+    autocmd VimEnter * LspOptionsSet(lspOpts)
+
     var lspServers = [
                     {
                        name: 'clangd',
@@ -425,9 +429,6 @@ language server and to set the language server options.  For example: >
                      }
                   ]
     autocmd VimEnter * LspAddServer(lspServers)
-
-    var lspOpts = {autoHighlightDiags: true}
-    autocmd VimEnter * LspOptionsSet(lspOpts)
 <
                                                *lsp-options* *LspOptionsSet()*
                                                *g:LspOptionsSet()*