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.txt31
1 files changed, 22 insertions, 9 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index f4975b187f..9ed75e1356 100644
--- a/runtime/doc/diagnostic.txt
+++ b/runtime/doc/diagnostic.txt
@@ -216,18 +216,31 @@ config({opts}, {namespace}) *vim.diagnostic.config()*
{opts} table Configuration table with the following
keys:
• underline: (default true) Use underline for
- diagnostics
+ diagnostics. Options:
+ • severity: Only underline diagnostics
+ matching the given severity
+ |diagnostic-severity|
+
• virtual_text: (default true) Use virtual
- text for diagnostics
+ text for diagnostics. Options:
+ • severity: Only show virtual text for
+ diagnostics matching the given severity
+ |diagnostic-severity|
+
• signs: (default true) Use signs for
- diagnostics
+ diagnostics. Options:
+ • severity: Only show signs for diagnostics
+ matching the given severity
+ |diagnostic-severity|
+
• update_in_insert: (default false) Update
diagnostics in Insert mode (if false,
diagnostics are updated on InsertLeave)
• severity_sort: (default false) Sort
diagnostics by severity. This affects the
order in which signs and virtual text are
- displayed
+ displayed. Options:
+ • reverse: (boolean) Reverse sort order
{namespace} number|nil Update the options for the given
namespace. When omitted, update the global
diagnostic options.
@@ -254,7 +267,7 @@ get({bufnr}, {opts}) *vim.diagnostic.get()*
Get current diagnostics.
Parameters: ~
- {bufnr} number|nil Buffer number to get diagnistics from.
+ {bufnr} number|nil Buffer number to get diagnostics from.
Use 0 for current buffer or nil for all buffers.
{opts} table|nil A table with the following keys:
• namespace: (number) Limit diagnostics to the
@@ -320,7 +333,7 @@ get_virt_text_chunks({line_diags}, {opts})
insert before virtual text.
Return: ~
- an array of [text, hl_group] arrays. This can be passed
+ array of ({text}, {hl_group}) tuples. This can be passed
directly to the {virt_text} option of
|nvim_buf_set_extmark()|.
@@ -456,7 +469,7 @@ show_line_diagnostics({opts}, {bufnr}, {lnum})
of cursor.
Return: ~
- A ({popup_bufnr}, {win_id}) tuple
+ tuple ({popup_bufnr}, {win_id})
*vim.diagnostic.show_position_diagnostics()*
show_position_diagnostics({opts}, {bufnr}, {position})
@@ -465,7 +478,7 @@ show_position_diagnostics({opts}, {bufnr}, {position})
Parameters: ~
{opts} table|nil Configuration table with the same
- keys as |vim.lsp.util.open_floatin_preview()|
+ keys as |vim.lsp.util.open_floating_preview()|
in addition to the following:
• namespace: (number) Limit diagnostics to the
given namespace
@@ -478,6 +491,6 @@ show_position_diagnostics({opts}, {bufnr}, {position})
to the current cursor position.
Return: ~
- A ({popup_bufnr}, {win_id}) tuple
+ tuple ({popup_bufnr}, {win_id})
vim:tw=78:ts=8:ft=help:norl: