nvim_runtime_lua

vim.diagnostic._display

Methods2

function _display.hide(namespace: nil | integer, bufnr: nil | integer) -> nil
Parameters
namespacenil | integer

Diagnostic namespace. When omitted, hide diagnostics from all namespaces.

bufnrnil | integer

Buffer number, or 0 for current buffer. When omitted, hide diagnostics in all buffers.

Returns
nil
function _display.show(namespace: nil | integer, bufnr: nil | integer, diagnostics: vim.Diagnostic[] | nil, opts: vim.diagnostic.Opts | nil) -> nil
Parameters
namespacenil | integer

Diagnostic namespace. When omitted, show diagnostics from all namespaces.

bufnrnil | integer

Buffer number, or 0 for current buffer. When omitted, show diagnostics in all buffers.

diagnosticsvim.Diagnostic[] | nil

The diagnostics to display. When omitted, use the saved diagnostics for the given namespace and buffer. This can be used to display a list of diagnostics without saving them or to display only a subset of diagnostics. May not be used when {namespace} or {bufnr} is nil.

optsvim.diagnostic.Opts | nil

Display options.

Returns
nil