feat(diagnostic): add support for tags

The LSP spec supports two tags that can be added to diagnostics:
unnecessary and deprecated. Extend vim.diagnostic to be able to handle
these.
This commit is contained in:
Lewis Russell
2023-03-30 14:49:58 +01:00
committed by GitHub
parent 8fa7d833cf
commit 226a6c3eae
9 changed files with 83 additions and 16 deletions

View File

@@ -21,6 +21,7 @@ end
--]=]
local constants = {
--- @enum lsp.DiagnosticSeverity
DiagnosticSeverity = {
-- Reports an error.
Error = 1,
@@ -32,6 +33,7 @@ local constants = {
Hint = 4,
},
--- @enum lsp.DiagnosticTag
DiagnosticTag = {
-- Unused or unnecessary code
Unnecessary = 1,