neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit e164f4c2715c97b48607bb6339eac3aff7106c47
parent 75b8f4c8cbe595ff868c1a0c59edbdf9658e46b0
Author: Yi Ming <ofseed@foxmail.com>
Date:   Mon, 18 Dec 2023 08:11:47 +0800

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


Diffstat:
Mruntime/doc/diagnostic.txt | 3+++
Mruntime/lua/vim/diagnostic.lua | 2++
2 files changed, 5 insertions(+), 0 deletions(-)

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