aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/diagnostic.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/diagnostic.txt')
-rw-r--r--runtime/doc/diagnostic.txt27
1 files changed, 7 insertions, 20 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index 59b73771a6..c0ae6a5a1a 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:
@@ -329,26 +333,6 @@ get_prev_pos({opts}) *vim.diagnostic.get_prev_pos()*
Return: ~
table Previous diagnostic position as a (row, col) tuple.
- *vim.diagnostic.get_virt_text_chunks()*
-get_virt_text_chunks({line_diags}, {opts})
- Get virtual text chunks to display using
- |nvim_buf_set_extmark()|.
-
- Parameters: ~
- {line_diags} table The diagnostics associated with the
- line.
- {opts} table|nil Configuration table with the
- following keys:
- • prefix: (string) Prefix to display before
- virtual text on line.
- • spacing: (number) Number of spaces to
- insert before virtual text.
-
- Return: ~
- array of ({text}, {hl_group}) tuples. This can be passed
- directly to the {virt_text} option of
- |nvim_buf_set_extmark()|.
-
goto_next({opts}) *vim.diagnostic.goto_next()*
Move to the next diagnostic.
@@ -532,6 +516,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