]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Improved doc
authorGirish Palya <girishji@gmail.com>
Wed, 19 Jul 2023 13:34:26 +0000 (15:34 +0200)
committerGirish Palya <girishji@gmail.com>
Wed, 19 Jul 2023 13:34:26 +0000 (15:34 +0200)
M  doc/lsp.txt

doc/lsp.txt

index 0c60316f978719e33ea1690b2588fc21d654667f..b33aa9769d7527578c2be1a0cb40169e2135889a 100644 (file)
@@ -1258,25 +1258,20 @@ returned items.  You can modify the 'completionMatcher' option to use either
 case insensitive or fuzzy comparison.
 
 In addition to the automatic completion and omni completion, it is possible to
-use external completion engines which provide asynchronous completion
-from various sources. LSP client can be used as a completion source by
-repurposing `g:LspOmniFunc` function. It needs to be invoked twice as
+use external completion engines. LSP client can be used as a completion source
+by repurposing `g:LspOmniFunc` function. It needs to be invoked twice as
 described in |complete-functions|. After the first invocation a request is
-sent to the LSP server to find completion candidates. Later the function is
-called again to actually obtain the matches. If the LSP server has not replied
-with the matches `g:LspOmniFunc` could wait up to 2 seconds. To avoid blocking
-wait call `g:LspOmniCompletePending` function which returns `true` immediately
-if LSP server is not ready. `g:LspOmniFunc` should be called the second time
-only after this function returns `false`.
+sent to the LSP server to find completion candidates. Second invocation
+returns the matches from LSP server. If the LSP server is not ready to reply
+`g:LspOmniFunc` waits for up to 2 seconds. This wait blocks the caller from
+doing other work, which may be a concern for asynchronous completion engines.
+To avoid blocking wait call `g:LspOmniCompletePending` function which returns
+`true` immediately if LSP server is not ready. `g:LspOmniFunc` can be
+called (the second time) only after this function returns `false`.
 
 ==============================================================================
 7. Diagnostics                                         *lsp-diagnostics*
-
-When a source file has syntax errors or warnings or static analysis warnings,
-the LSP plugin highlights them by placing |signs| in the |sign-column|.  You
-can use the ":LspDiag show" command to display all the diagnostic messages for
-the current file in a |location-list-window|.  You can use the
-":LspDiag first" command to jump to the line with the first diagnostic
+When a source file has syntax errors or warnings or static analysis warnings, the LSP plugin highlights them by placing |signs| in the |sign-column|.  You can use the ":LspDiag show" command to display all the diagnostic messages for the current file in a |location-list-window|.  You can use the ":LspDiag first" command to jump to the line with the first diagnostic
 message, the ":LspDiag next" command to jump to the next nearest line with the
 diagnostic message, the ":LspDiag prev" command to jump to the previous
 nearest line with the diagnostic message, the ":LspDiag here" command to jump