aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2021-09-18 15:00:32 -0600
committerGregory Anders <greg@gpanders.com>2021-09-21 18:54:26 -0600
commitd43151ea0bb194f7463cc8762919cd38546973c2 (patch)
tree090c7246572f6d75e9cdc6b0c6d02f0be882808a /runtime/doc
parent17b7968f02bca309bb2e7b00752667baa6b4d765 (diff)
downloadrneovim-d43151ea0bb194f7463cc8762919cd38546973c2.tar.gz
rneovim-d43151ea0bb194f7463cc8762919cd38546973c2.tar.bz2
rneovim-d43151ea0bb194f7463cc8762919cd38546973c2.zip
feat(diagnostic): add option to include diagnostic source
Add an option to virtual text display and floating window previews to include diagnostic source in the diagnostic message.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/diagnostic.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index 59b73771a6..5845f11073 100644
--- a/runtime/doc/diagnostic.txt
+++ b/runtime/doc/diagnostic.txt
@@ -47,6 +47,7 @@ A diagnostic is a Lua table with the following keys:
end_col: The final column of the diagnostic
severity: The severity of the diagnostic |vim.diagnostic.severity|
message: The diagnostic text
+ source: The source of the diagnostic
Diagnostics use the same indexing as the rest of the Nvim API (i.e. 0-based
rows and columns). |api-indexing|
@@ -226,6 +227,9 @@ config({opts}, {namespace}) *vim.diagnostic.config()*
• severity: Only show virtual text for
diagnostics matching the given severity
|diagnostic-severity|
+ • source: (string) Include the diagnostic
+ source in virtual text. One of "always"
+ or "if_many".
• signs: (default true) Use signs for
diagnostics. Options:
@@ -532,6 +536,9 @@ show_position_diagnostics({opts}, {bufnr}, {position})
• severity: See |diagnostic-severity|.
• show_header: (boolean, default true) Show
"Diagnostics:" header
+ • source: (string) Include the diagnostic
+ source in the message. One of "always" or
+ "if_many".
{bufnr} number|nil Buffer number. Defaults to the
current buffer.
{position} table|nil The (0,0)-indexed position. Defaults