mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
docs(diagnostic): mention severity
in Opts.VirtualLines
(#33293)
Problem: `severity` field is recognized by
`vim.diagnostic.Opts.VirtualLines`, but it is not explicitly
documented.
Solution: document it.
(cherry picked from commit 71e133e5e6
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
91d11c8bc1
commit
dd547ef1ea
@@ -574,8 +574,8 @@ Lua module: vim.diagnostic *diagnostic-api*
|
|||||||
*vim.diagnostic.Opts.Signs*
|
*vim.diagnostic.Opts.Signs*
|
||||||
|
|
||||||
Fields: ~
|
Fields: ~
|
||||||
• {severity}? (`vim.diagnostic.SeverityFilter`) Only show virtual text
|
• {severity}? (`vim.diagnostic.SeverityFilter`) Only show signs for
|
||||||
for diagnostics matching the given severity
|
diagnostics matching the given severity
|
||||||
|diagnostic-severity|
|
|diagnostic-severity|
|
||||||
• {priority}? (`integer`, default: `10`) Base priority to use for
|
• {priority}? (`integer`, default: `10`) Base priority to use for
|
||||||
signs. When {severity_sort} is used, the priority of a
|
signs. When {severity_sort} is used, the priority of a
|
||||||
@@ -607,6 +607,9 @@ Lua module: vim.diagnostic *diagnostic-api*
|
|||||||
*vim.diagnostic.Opts.VirtualLines*
|
*vim.diagnostic.Opts.VirtualLines*
|
||||||
|
|
||||||
Fields: ~
|
Fields: ~
|
||||||
|
• {severity}? (`vim.diagnostic.SeverityFilter`) Only show virtual
|
||||||
|
lines for diagnostics matching the given severity
|
||||||
|
|diagnostic-severity|
|
||||||
• {current_line}? (`boolean`, default: `false`) Only show diagnostics
|
• {current_line}? (`boolean`, default: `false`) Only show diagnostics
|
||||||
for the current line.
|
for the current line.
|
||||||
• {format}? (`fun(diagnostic:vim.Diagnostic): string?`) A
|
• {format}? (`fun(diagnostic:vim.Diagnostic): string?`) A
|
||||||
|
@@ -241,6 +241,10 @@ end
|
|||||||
|
|
||||||
--- @class vim.diagnostic.Opts.VirtualLines
|
--- @class vim.diagnostic.Opts.VirtualLines
|
||||||
---
|
---
|
||||||
|
--- Only show virtual lines for diagnostics matching the given
|
||||||
|
--- severity |diagnostic-severity|
|
||||||
|
--- @field severity? vim.diagnostic.SeverityFilter
|
||||||
|
---
|
||||||
--- Only show diagnostics for the current line.
|
--- Only show diagnostics for the current line.
|
||||||
--- (default: `false`)
|
--- (default: `false`)
|
||||||
--- @field current_line? boolean
|
--- @field current_line? boolean
|
||||||
@@ -252,7 +256,7 @@ end
|
|||||||
|
|
||||||
--- @class vim.diagnostic.Opts.Signs
|
--- @class vim.diagnostic.Opts.Signs
|
||||||
---
|
---
|
||||||
--- Only show virtual text for diagnostics matching the given
|
--- Only show signs for diagnostics matching the given
|
||||||
--- severity |diagnostic-severity|
|
--- severity |diagnostic-severity|
|
||||||
--- @field severity? vim.diagnostic.SeverityFilter
|
--- @field severity? vim.diagnostic.SeverityFilter
|
||||||
---
|
---
|
||||||
|
Reference in New Issue
Block a user