diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2021-11-09 14:33:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 14:33:01 -0700 |
commit | 953ae71fd324eb1a263d2b7435cc15756b44ac2d (patch) | |
tree | 5ad0af3b8dd0036a21bb1f502e6918ed5974a486 /runtime/doc | |
parent | 8f31b218f97d143d909d4b8b86dc528e70c151e3 (diff) | |
download | rneovim-953ae71fd324eb1a263d2b7435cc15756b44ac2d.tar.gz rneovim-953ae71fd324eb1a263d2b7435cc15756b44ac2d.tar.bz2 rneovim-953ae71fd324eb1a263d2b7435cc15756b44ac2d.zip |
feat(diagnostic): do not require namespace for hide() and show() (#16261)
Also fix a few other small bugs regarding saving and restoring extmarks.
In particular, now that the virtual text and underline handlers have
their own dedicated namespaces, they should be responsible for saving
and restoring their own extmarks. Also fix the wrong argument ordering
in the call to `clear_diagnostic_cache` in the `on_detach` callback.
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/diagnostic.txt | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index d121dba435..e2469b4f4e 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -536,7 +536,9 @@ hide({namespace}, {bufnr}) *vim.diagnostic.hide()* |vim.diagnostic.disable()|. Parameters: ~ - {namespace} number The diagnostic namespace + {namespace} number|nil Diagnostic namespace. When + omitted, hide diagnostics from all + namespaces. {bufnr} number|nil Buffer number. Defaults to the current buffer. @@ -626,7 +628,9 @@ reset({namespace}, {bufnr}) *vim.diagnostic.reset()* |vim.diagnostic.hide()|. Parameters: ~ - {namespace} number + {namespace} number|nil Diagnostic namespace. When + omitted, remove diagnostics from all + namespaces. {bufnr} number|nil Remove diagnostics for the given buffer. When omitted, diagnostics are removed for all buffers. @@ -677,7 +681,9 @@ show({namespace}, {bufnr}, {diagnostics}, {opts}) Display diagnostics for the given namespace and buffer. Parameters: ~ - {namespace} number Diagnostic namespace. + {namespace} number|nil Diagnostic namespace. When + omitted, show diagnostics from all + namespaces. {bufnr} number|nil Buffer number. Defaults to the current buffer. {diagnostics} table|nil The diagnostics to display. When @@ -685,7 +691,8 @@ show({namespace}, {bufnr}, {diagnostics}, {opts}) given namespace and buffer. This can be used to display a list of diagnostics without saving them or to display only a - subset of diagnostics. + subset of diagnostics. May not be used when + {namespace} is nil. {opts} table|nil Display options. See |vim.diagnostic.config()|. |