# New LSP diagnostic messages received from the server for a file.
# Update the signs placed in the buffer for this file
def ProcessNewDiags(lspserver: dict<any>, bnr: number)
+ if opt.lspOptions.autoPopulateDiags
+ ShowAllDiags(lspserver, false)
+ endif
+
if !opt.lspOptions.autoHighlightDiags
return
endif
# Display the diagnostic messages from the LSP server for the current buffer
# in a location list
-export def ShowAllDiags(lspserver: dict<any>): void
+export def ShowAllDiags(lspserver: dict<any>, open = true): void
var fname: string = expand('%:p')
if fname == ''
return
endfor
setloclist(0, [], ' ', {'title': 'Language Server Diagnostics',
'items': qflist})
- :lopen
+ if open
+ :lopen
+ endif
enddef
# Show the diagnostic message for the current line
echoSignature: false,
# Automatically highlight diagnostics messages from LSP server
autoHighlightDiags: true,
+ # Automatically populate the location list with new diagnostics
+ autoPopulateDiags: false,
# Show the symbol documentation in the preview window instead of in a popup
hoverInPreview: false,
# Focus on the location list window after LspShowReferences
autoHighlightDiags Automatically place signs on the lines with a
diagnostic message from the LSP server. By default
this is set to true.
+autoPopulateDiags Automatically populate the location list with
+ diagnostics from the LSP server. By default this is
+ set to false.
keepFocusInReferences Focus on the location list window after
LspShowReferences. By default this is set to false.
noNewlineInCompletion Suppress adding a new line on completion selection