mirror of
https://github.com/neovim/neovim.git
synced 2026-07-21 08:31:47 +00:00
docs(diagnostic): severity names are sometimes allowed #39120
Problem: Using severity names (like "ERROR", "WARN") in functions like
`vim.diganostic.get()` and `vim.diagnostic.config()` is allowed and
tested for many years now. But documentation about it can be clearer.
Solution: Explicitly mention that severity names are allowed in some
situations. Ideally, it would also require updating typing for
`vim.diagnostic.SeverityFilter`, but that looks problematic to do
robustly.
(cherry picked from commit 711f3cc299)
This commit is contained in:
committed by
github-actions[bot]
parent
5f23c0a1cf
commit
9d66c7828e
@@ -48,7 +48,8 @@ The "severity" key in a diagnostic is one of the values defined in
|
||||
vim.diagnostic.severity.HINT
|
||||
|
||||
Functions that take a severity as an optional parameter (e.g.
|
||||
|vim.diagnostic.get()|) accept one of three forms:
|
||||
|vim.diagnostic.get()|) allow using severity names (like "ERROR") as well as
|
||||
values and accept one of three forms:
|
||||
|
||||
1. A single |vim.diagnostic.severity| value: >lua
|
||||
|
||||
|
||||
Reference in New Issue
Block a user