From 226a6c3eaef2a7220841d3d5e69e1baf543b3d6f Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 30 Mar 2023 14:49:58 +0100 Subject: 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. --- runtime/doc/lsp.txt | 3 ++- runtime/doc/news.txt | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 0164b34efb..f5695669ae 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1113,7 +1113,8 @@ code_action({options}) *vim.lsp.buf.code_action()* • {options} (table|nil) Optional table which holds the following optional fields: • context: (table|nil) Corresponds to `CodeActionContext` of the LSP specification: - • diagnostics (table|nil): LSP`Diagnostic[]` . Inferred from the current position if not provided. + • diagnostics (table|nil): LSP `Diagnostic[]`. Inferred + from the current position if not provided. • only (table|nil): List of LSP `CodeActionKind`s used to filter the code actions. Most language servers support values like `refactor` or `quickfix`. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 890a033268..401719b432 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -226,6 +226,9 @@ The following new APIs or features were added. • Added |nvim_get_hl()| for getting highlight group definitions in a format compatible with |nvim_set_hl()|. +• |vim.diagnostic| now supports LSP DiagnosticsTag. + See: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticTag + ============================================================================== CHANGED FEATURES *news-changes* -- cgit