# Display the diagnostic messages from the LSP server for the current buffer
# in a location list
export def ShowAllDiags(): void
+ var save_winid = win_getid()
+
if !DiagsUpdateLocList(bufnr())
util.WarnMsg($'No diagnostic messages found for {@%}')
return
endif
:lopen
+ if !opt.lspOptions.keepFocusInDiags
+ save_winid->win_gotoid()
+ endif
enddef
# Display the message of 'diag' in a popup window right below the position in
hoverInPreview: false,
# Don't print message when a configured language server is missing.
ignoreMissingServer: false,
+ # Focus on the location list window after LspDiagShow
+ keepFocusInDiags: true,
# Focus on the location list window after LspShowReferences
keepFocusInReferences: false,
# If true, apply the LSP server supplied text edits after a completion.
*lsp-opt-ignoreMissingServer*
ignoreMissingServer |Boolean| option. Do not print a missing language
server executable. By default this is set to false.
+ *lsp-opt-keepFocusInDiags*
+keepFocusInDiags |Boolean| option. Focus on the location list window
+ after LspDiagShow.
+ By default this is set to true.
*lsp-opt-keepFocusInReferences*
keepFocusInReferences |Boolean| option. Focus on the location list window
after LspShowReferences.