]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Add example to docs
authorAndreas Louv <andreas@louv.dk>
Sun, 2 Apr 2023 23:07:41 +0000 (01:07 +0200)
committerAndreas Louv <andreas@louv.dk>
Sun, 2 Apr 2023 23:40:54 +0000 (01:40 +0200)
doc/lsp.txt

index 5937ce7c1eaba2d20f0d45e4582e08b8a22cd4c6..3e6ca7581fe89e95aa612b752dbb2203391521b7 100644 (file)
@@ -443,6 +443,14 @@ can map these commands to keys and make it easier to invoke them.
                        the cursor.  Otherwise works exactly like
                        |:LspDiagCurrent|
 
+                       To show the current diagnotic under the cursor while
+                       moving around the following autocmd can be used: >
+
+                           augroup LspCustom
+                           au!
+                           au CursorMoved * silent! LspDiagCurrent!
+                           augroup END
+<
                                                *:LspDiagFirst*
 :LspDiagFirst          Jumps to the location of the first diagnostic message
                        for the current file.