aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorRaphael <glephunter@gmail.com>2023-01-13 00:57:39 +0800
committerGitHub <noreply@github.com>2023-01-12 08:57:39 -0800
commit572cd8031dd7c91ac9e17cbdfab16d87f1fed6b7 (patch)
treea7fbcfec93b8d07609cad67d2155513909cb0f34 /runtime/doc
parenta0b2c124a3cba591575ecf6d2dfe91f515c2ebe2 (diff)
downloadrneovim-572cd8031dd7c91ac9e17cbdfab16d87f1fed6b7.tar.gz
rneovim-572cd8031dd7c91ac9e17cbdfab16d87f1fed6b7.tar.bz2
rneovim-572cd8031dd7c91ac9e17cbdfab16d87f1fed6b7.zip
feat(diagnostic): vim.diagnostic.is_disabled() #21527
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/diagnostic.txt12
-rw-r--r--runtime/doc/news.txt3
2 files changed, 15 insertions, 0 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index 66ac2170e3..7066a3739a 100644
--- a/runtime/doc/diagnostic.txt
+++ b/runtime/doc/diagnostic.txt
@@ -565,6 +565,18 @@ hide({namespace}, {bufnr}) *vim.diagnostic.hide()*
• {bufnr} (number|nil) Buffer number, or 0 for current buffer. When
omitted, hide diagnostics in all buffers.
+is_disabled({bufnr}, {namespace}) *vim.diagnostic.is_disabled()*
+ Check whether diagnostics are disabled in a given buffer.
+
+ Parameters: ~
+ • {bufnr} (number|nil) Buffer number, or 0 for current buffer.
+ • {namespace} (number|nil) Diagnostic namespace. When omitted, checks if all diagnostics are
+ disabled in {bufnr}. Otherwise, only checks if
+ diagnostics from {namespace} are disabled.
+
+ Return: ~
+ (boolean)
+
*vim.diagnostic.match()*
match({str}, {pat}, {groups}, {severity_map}, {defaults})
Parse a diagnostic from a string.
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 7dceaa3318..ce07c3035c 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -135,6 +135,9 @@ The following new APIs or features were added.
See https://github.com/neovim/neovim/pull/14537.
+• |vim.diagnostic.is_disabled()| checks if diagnostics are disabled in a given
+ buffer or namespace.
+
• |--remote-ui| option was added to connect to a remote instance and display
in it in a |TUI| in the local terminal. This can be used run a headless nvim
instance in the background and display its UI on demand, which previously