function removes all saved
diagnostics. They cannot be redisplayed using |vim.diagnostic.show()|. To
simply remove diagnostic decorations in a way that they can be
re-displayed, use |vim.diagnostic.hide()|.
Parameters: ~
• {namespace} (`integer?`) Diagnostic namespace. When omitted, remove
diagnostics from all namespaces.
• {bufnr} (`integer?`) Remove diagnostics for the given buffer.
When omitted, diagnostics are removed for all buffers.
set({namespace}, {bufnr}, {diagnostics}, {opts}) *vim.diagnostic.set()*
Set diagnostics for the given namespace and buffer.
Parameters: ~
• {namespace} (`integer`) The diagnostic namespace
• {bufnr} (`integer`) Buffer number
• {diagnostics} (`vim.Diagnostic.Set[]`) See |vim.Diagnostic.Set|.
• {opts} (`vim.diagnostic.Opts?`) Display options to pass to
|vim.diagnostic.show()|. See |vim.diagnostic.Opts|.
setloclist({opts}) *vim.diagnostic.setloclist()*
Add buffer diagnostics to the location list.
Parameters: ~
• {opts} (`table?`) Configuration table with the following keys:
• {namespace}? (`integer[]|integer`) Only add diagnostics from
the given namespace(s).
• {winnr}? (`integer`, default: `0`) Window number to set
location list for.
• {open}? (`boolean`, default: `true`) Open the location list
after setting.
• {title}? (`string`) Title of the location list. Defaults to
"Diagnostics".
• {severity}? (`vim.diagnostic.SeverityFilter`) See
|diagnostic-severity|.
• {format}? (`fun(diagnostic:vim.Diagnostic): string?`) A
function that takes a diagnostic as input and returns a
string or nil. If the return value is nil, the diagnostic is
not displayed in the location list. Else the output text is
used to display the diagnostic.
setqflist({opts}) *vim.diagnostic.setqflist()*
Add all diagnostics to the quickfix list.
Parameters: ~
• {opts} (`table?`) Configuration table with the following keys: