commit 14b7ffcf89bc448b626df3d9e19f9f5a3682ae2b
parent 587490217ec5bc7d3d06e045d4df46c0150ed7dc
Author: Lewis Russell <lewis6991@gmail.com>
Date: Tue, 16 Jan 2024 10:30:08 +0000
feat: add __call typing for vim.inspect()
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git 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