Home Explore Blog CI



neovim

5th chunk of `runtime/doc/diagnostic.txt`
f9dff9044c6afe4d16105465f0c76d22437fcd82f58916040000000100000fa0
 *hl-DiagnosticVirtualLinesOk*
DiagnosticVirtualLinesOk
    Used for "Ok" diagnostic virtual lines.

                                                *hl-DiagnosticUnderlineError*
DiagnosticUnderlineError
    Used to underline "Error" diagnostics.

                                                *hl-DiagnosticUnderlineWarn*
DiagnosticUnderlineWarn
    Used to underline "Warn" diagnostics.

                                                *hl-DiagnosticUnderlineInfo*
DiagnosticUnderlineInfo
    Used to underline "Info" diagnostics.

                                                *hl-DiagnosticUnderlineHint*
DiagnosticUnderlineHint
    Used to underline "Hint" diagnostics.

                                                *hl-DiagnosticUnderlineOk*
DiagnosticUnderlineOk
    Used to underline "Ok" diagnostics.

                                                *hl-DiagnosticFloatingError*
DiagnosticFloatingError
    Used to color "Error" diagnostic messages in diagnostics float.
    See |vim.diagnostic.open_float()|

                                                *hl-DiagnosticFloatingWarn*
DiagnosticFloatingWarn
    Used to color "Warn" diagnostic messages in diagnostics float.

                                                *hl-DiagnosticFloatingInfo*
DiagnosticFloatingInfo
    Used to color "Info" diagnostic messages in diagnostics float.

                                                *hl-DiagnosticFloatingHint*
DiagnosticFloatingHint
    Used to color "Hint" diagnostic messages in diagnostics float.

                                                *hl-DiagnosticFloatingOk*
DiagnosticFloatingOk
    Used to color "Ok" diagnostic messages in diagnostics float.

                                                *hl-DiagnosticSignError*
DiagnosticSignError
    Used for "Error" signs in sign column.

                                                *hl-DiagnosticSignWarn*
DiagnosticSignWarn
    Used for "Warn" signs in sign column.

                                                *hl-DiagnosticSignInfo*
DiagnosticSignInfo
    Used for "Info" signs in sign column.

                                                *hl-DiagnosticSignHint*
DiagnosticSignHint
    Used for "Hint" signs in sign column.

                                                *hl-DiagnosticSignOk*
DiagnosticSignOk
    Used for "Ok" signs in sign column.

                                                *hl-DiagnosticDeprecated*
DiagnosticDeprecated
    Used for deprecated or obsolete code.

                                                *hl-DiagnosticUnnecessary*
DiagnosticUnnecessary
    Used for unnecessary or unused code.

==============================================================================
SIGNS                                                   *diagnostic-signs*

Signs are defined for each diagnostic severity. The default text for each sign
is the first letter of the severity name (for example, "E" for ERROR). Signs
can be customized with |vim.diagnostic.config()|. Example: >lua

    -- Highlight entire line for errors
    -- Highlight the line number for warnings
    vim.diagnostic.config({
        signs = {
            text = {
                [vim.diagnostic.severity.ERROR] = '',
                [vim.diagnostic.severity.WARN] = '',
            },
            linehl = {
                [vim.diagnostic.severity.ERROR] = 'ErrorMsg',
            },
            numhl = {
                [vim.diagnostic.severity.WARN] = 'WarningMsg',
            },
        },
    })

When the "severity_sort" option is set (see |vim.diagnostic.config()|) the
priority of each sign depends on the severity of the associated diagnostic.
Otherwise, all signs have the same priority (the value of the "priority"
option in the "signs" table of |vim.diagnostic.config()| or 10 if unset).

==============================================================================
EVENTS                                                  *diagnostic-events*

                                           

Title: Diagnostic Highlights: Underlines, Floating Windows, Signs, Deprecated/Unnecessary Code & Diagnostic Signs Configuration
Summary
This section lists the highlight groups for diagnostic underlines, floating windows, and signs for various severities (Error, Warn, Info, Hint, Ok). It also defines highlight groups for deprecated/obsolete and unnecessary/unused code. Additionally, it explains how to customize signs for each diagnostic severity, including setting text, highlighting the entire line, or highlighting the line number. It also touches on the priority of diagnostic signs when the `severity_sort` option is set.