docs(diagnostic): add return value of vim.diagnostic.config() (#26615)

This commit is contained in:
Yi Ming 2023-12-18 08:11:47 +08:00 committed by GitHub
parent 75b8f4c8cb
commit e164f4c271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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.

View File

@ -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 },