doc/lsp.txt | 7 ++++--- diff --git a/doc/lsp.txt b/doc/lsp.txt index d7c4bbd8026cdc83d928b529f6c1310d41357e44..3c65c2bee0e0a3febfc8ee36afc37bed12bf4711 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -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 @@ args: ['--background-index'] } ] autocmd VimEnter * LspAddServer(lspServers) - - var lspOpts = {autoHighlightDiags: true} - autocmd VimEnter * LspOptionsSet(lspOpts) < *lsp-options* *LspOptionsSet()* *g:LspOptionsSet()*