From: Girish Palya Date: Wed, 19 Jul 2023 13:47:24 +0000 (+0200) Subject: Improved doc X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=4d8b4c0a6825266bd60d1c15945a4b08151bd79e;p=vim-lsp.git Improved doc M doc/lsp.txt --- diff --git a/doc/lsp.txt b/doc/lsp.txt index b33aa97..f7cb09f 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -1258,20 +1258,26 @@ 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. 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. 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 +use external completion engines. LSP client can be used as a completion source +by repurposing `g:LspOmniFunc` function. The adapter which interfaces with +the external completion engine should invoke this function twice as +described in |complete-functions|. After the first invocation a request is +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 +`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