aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2023-08-16 08:21:32 -0500
committerGitHub <noreply@github.com>2023-08-16 08:21:32 -0500
commit9cb7e00b9748b08fce661f8cbeb06c5994c749ae (patch)
tree38928060dd252fffa8b765492d1977b5a25b19c3 /runtime/doc
parent54be7d6b45a9ae51c218c0e5c1c20dd608b97297 (diff)
downloadrneovim-9cb7e00b9748b08fce661f8cbeb06c5994c749ae.tar.gz
rneovim-9cb7e00b9748b08fce661f8cbeb06c5994c749ae.tar.bz2
rneovim-9cb7e00b9748b08fce661f8cbeb06c5994c749ae.zip
feat(diagnostic): provide more control over virtual text display (#24724)
Allow users to pass virtual text options to nvim_buf_set_extmark through the "virtual_text" table in vim.diagnostic.config(). Fixes: https://github.com/neovim/neovim/issues/16545
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/diagnostic.txt5
-rw-r--r--runtime/doc/news.txt5
2 files changed, 9 insertions, 1 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index d95e0d8333..edbba6ac41 100644
--- a/runtime/doc/diagnostic.txt
+++ b/runtime/doc/diagnostic.txt
@@ -382,7 +382,10 @@ config({opts}, {namespace}) *vim.diagnostic.config()*
• virtual_text: (default true) Use virtual text for
diagnostics. If multiple diagnostics are set for a
namespace, one prefix per diagnostic + the last
- diagnostic message are shown. Options:
+ diagnostic message are shown. In addition to the
+ options listed below, the "virt_text" options of
+ |nvim_buf_set_extmark()| may also be used here (e.g.
+ "virt_text_pos" and "hl_mode"). Options:
• severity: Only show virtual text for diagnostics
matching the given severity |diagnostic-severity|
• source: (boolean or string) Include the diagnostic
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 2396f4f5a2..576c56f408 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -194,6 +194,11 @@ The following changes to existing APIs or features add new behavior.
automatically if the job exited without error, eliminating the (often
unwanted) "[Process exited 0]" message.
+• |vim.diagnostic.config()| now accepts virtual text relevant options to
+ |nvim_buf_set_extmark()| (e.g. "virt_text_pos" and "hl_mode") in its
+ "virtual_text" table, which gives users more control over how diagnostic
+ virtual text is displayed.
+
==============================================================================
REMOVED FEATURES *news-removed*