aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/diagnostic.txt3
-rw-r--r--runtime/lua/vim/diagnostic.lua2
2 files changed, 5 insertions, 0 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index 4cf8fef7c4..94ed578823 100644
--- a/runtime/doc/diagnostic.txt
+++ b/runtime/doc/diagnostic.txt
@@ -466,6 +466,9 @@ config({opts}, {namespace}) *vim.diagnostic.config()*
• {namespace} (integer|nil) Update the options for the given namespace.
When omitted, update the global diagnostic options.
+ Return: ~
+ (table|nil) table of current diagnostic config if `opts` is omitted.
+
disable({bufnr}, {namespace}) *vim.diagnostic.disable()*
Disable diagnostics in the given buffer.
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua
index 2171ae14e6..e4f694b8a2 100644
--- a/runtime/lua/vim/diagnostic.lua
+++ b/runtime/lua/vim/diagnostic.lua
@@ -617,6 +617,8 @@ end
---
---@param namespace integer|nil Update the options for the given namespace. When omitted, update the
--- global diagnostic options.
+---
+---@return table|nil table of current diagnostic config if `opts` is omitted.
function M.config(opts, namespace)
vim.validate({
opts = { opts, 't', true },