From 14b7ffcf89bc448b626df3d9e19f9f5a3682ae2b Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 16 Jan 2024 10:30:08 +0000 Subject: [PATCH] feat: add __call typing for vim.inspect() --- runtime/lua/vim/_editor.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua index 4fe601dfd5..52a21587f4 100644 --- a/runtime/lua/vim/_editor.lua +++ b/runtime/lua/vim/_editor.lua @@ -190,12 +190,18 @@ function vim._os_proc_children(ppid) return children end +--- @class vim.inspect.Opts +--- @field depth? integer +--- @field newline? string +--- @field process? fun(item:any, path: string[]): any + --- Gets a human-readable representation of the given object. --- ---@see |vim.print()| ---@see https://github.com/kikito/inspect.lua ---@see https://github.com/mpeterv/vinspect ---@return string +---@overload fun(x: any, opts?: vim.inspect.Opts): string vim.inspect = vim.inspect do