(0-indexed)
• {severity}? (`vim.diagnostic.Severity`, default: `vim.diagnostic.severity.ERROR`)
The severity of the diagnostic |vim.diagnostic.severity|
• {message} (`string`) The diagnostic text
• {source}? (`string`) The source of the diagnostic
• {code}? (`string|integer`) The diagnostic code
• {user_data}? (`any`) arbitrary data plugins can add
*vim.diagnostic.GetOpts*
A table with the following keys:
Fields: ~
• {namespace}? (`integer[]|integer`) Limit diagnostics to one or more
namespaces.
• {lnum}? (`integer`) Limit diagnostics to those spanning the
specified line number.
• {severity}? (`vim.diagnostic.SeverityFilter`) See
|diagnostic-severity|.
• {enabled}? (`boolean`, default: `nil`) Limit diagnostics to only
enabled or disabled. If nil, enablement is ignored. See
|vim.diagnostic.enable()|
*vim.diagnostic.JumpOpts*
Extends: |vim.diagnostic.GetOpts|
Configuration table with the keys listed below. Some parameters can have
their default values changed with |vim.diagnostic.config()|.
Fields: ~
• {diagnostic}? (`vim.Diagnostic`) The diagnostic to jump to. Mutually
exclusive with {count}, {namespace}, and {severity}.
See |vim.Diagnostic|.
• {count}? (`integer`) The number of diagnostics to move by,
starting from {pos}. A positive integer moves forward
by {count} diagnostics, while a negative integer moves
backward by {count} diagnostics. Mutually exclusive
with {diagnostic}.
• {pos}? (`[integer,integer]`) Cursor position as a `(row, col)`
tuple. See |nvim_win_get_cursor()|. Used to find the
nearest diagnostic when {count} is used. Only used when
{count} is non-nil. Default is the current cursor
position.
• {wrap}? (`boolean`, default: `true`) Whether to loop around
file or not. Similar to 'wrapscan'.
• {severity}? (`vim.diagnostic.SeverityFilter`) See
|diagnostic-severity|.
• {on_jump}? (`fun(diagnostic:vim.Diagnostic?, bufnr:integer)`)
Optional callback invoked with the diagnostic that was
jumped to.
• {winid}? (`integer`, default: `0`) Window ID
*vim.diagnostic.NS*
Fields: ~
• {name} (`string`)
• {opts} (`vim.diagnostic.Opts`) See |vim.diagnostic.Opts|.
• {user_data} (`table`)
• {disabled}? (`boolean`)
*vim.diagnostic.Opts*
Many of the configuration options below accept one of the following:
• `false`: Disable this feature
• `true`: Enable this feature, use default settings.
• `table`: Enable this feature with overrides. Use an empty table to use
default values.
• `function`: Function with signature (namespace, bufnr) that returns any
of the above.
Fields: ~
• {underline}? (`boolean|vim.diagnostic.Opts.Underline|fun(namespace: integer, bufnr:integer): vim.diagnostic.Opts.Underline`, default: `true`)
Use underline for diagnostics.
• {virtual_text}? (`boolean|vim.diagnostic.Opts.VirtualText|fun(namespace: integer, bufnr:integer): vim.diagnostic.Opts.VirtualText`, default: `false`)
Use virtual text for diagnostics. If multiple
diagnostics are set for a namespace, one prefix
per diagnostic + the last diagnostic message are
shown.
• {virtual_lines}? (`boolean|vim.diagnostic.Opts.VirtualLines|fun(namespace: integer, bufnr:integer): vim.diagnostic.Opts.VirtualLines`,