From: Girish Palya Date: Wed, 19 Jul 2023 13:34:26 +0000 (+0200) Subject: Improved doc X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fd78f23407fe9c443e8395050a88d3f936377e29;p=vim-lsp.git Improved doc M doc/lsp.txt --- diff --git a/doc/lsp.txt b/doc/lsp.txt index 0c60316..b33aa97 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -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