From 38a52caec09eb15c9ff8b4db6f0cdb7e2a28eb98 Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Sun, 2 Feb 2025 14:06:05 -0800 Subject: feat(diagnostic): add `current_line` option for `virtual_text` handler --- runtime/doc/diagnostic.txt | 2 ++ runtime/doc/news.txt | 2 ++ 2 files changed, 4 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index b7bdf2b446..5e1e04ce56 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -621,6 +621,8 @@ Lua module: vim.diagnostic *diagnostic-api* • {severity}? (`vim.diagnostic.SeverityFilter`) Only show virtual text for diagnostics matching the given severity |diagnostic-severity| + • {current_line}? (`boolean`) Only show diagnostics for the + current line. (default `false`) • {source}? (`boolean|"if_many"`) Include the diagnostic source in virtual text. Use `'if_many'` to only show sources if there is more than one diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index fda37852d6..12fac28db8 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -243,6 +243,8 @@ DIAGNOSTICS |vim.diagnostic.jump()|. • A "virtual_lines" diagnostic handler was added to render diagnostics using virtual lines below the respective code. +• The "virtual_text" diagnostic handler accepts a `current_line` option to + only show virtual text at the cursor's line. EDITOR -- cgit