Diagnostics#
lsp-diagnostic-clean-after-change#
Type: boolean
Default: nil
When non-nil, clean the diagnostics on change.
Note that when that setting is nil, lsp-mode will show stale
diagnostics until server publishes the new set of diagnostics
lsp-diagnostics-attributes#
Type: (repeat (list symbol plist))
Default: ((unnecessary :foreground gray) (deprecated :strike-through t))
The Attributes used on the diagnostics.
List containing (tag attributes) where tag is the LSP diagnostic tag and
attributes is a plist containing face attributes which will be applied
on top the flycheck face for that error level.
lsp-diagnostics-disabled-modes#
Type: (repeat symbol)
Default: nil
A list of major models for which lsp-diagnostics-mode should be disabled.
lsp-diagnostics-flycheck-default-level#
Type: (choice (const error) (const warning) (const info))
Default: error
Error level to use when the server does not report back a diagnostic level.
lsp-diagnostics-flymake-message-formatter#
Type: function
Default: lsp-diagnostics-flymake-default-message-formatter
Function used to build the flymake text string for an LSP diagnostic.
Flymake stores a single string per diagnostic
(flymake-diagnostic-text), so any presentation choice (whether to
append the rule code, the source, severity prefix, etc.) must be made
before the flymake-diagnostic is constructed. This hook provides the
place to make that choice.
Called with one argument, the LSP Diagnostic plist (with fields such
as :message, :code?, :source?, :severity?, :tags?). Must
return a string.
The default lsp-diagnostics-flymake-default-message-formatter appends
[code] when the diagnostic carries one and returns the bare message
otherwise. Override to suppress the code, prepend the source, or
reformat the message in any other way.
lsp-diagnostics-provider#
Type: (choice (const :tag Pick flycheck if present and fallback to flymake :auto) (const :tag Pick flycheck :flycheck) (const :tag Pick flymake :flymake) (const :tag Use neither flymake nor lsp :none) (const :tag Prefer flymake t) (const :tag Prefer flycheck nil))
Default: :auto
The checker backend provider.