diff options
-rw-r--r-- | runtime/doc/lua.txt | 3 | ||||
-rw-r--r-- | runtime/lua/vim/_editor.lua | 1 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 8 | ||||
-rw-r--r-- | src/nvim/eval.lua | 6 |
4 files changed, 12 insertions, 6 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 39eb530c24..f5b3e56f61 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1567,6 +1567,9 @@ vim.deprecate({name}, {alternative}, {version}, {plugin}, {backtrace}) vim.inspect *vim.inspect()* Gets a human-readable representation of the given object. + Return: ~ + (string) + See also: ~ • |vim.print()| • https://github.com/kikito/inspect.lua diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua index 8c10cc7da3..96ac379368 100644 --- a/runtime/lua/vim/_editor.lua +++ b/runtime/lua/vim/_editor.lua @@ -188,6 +188,7 @@ end ---@see |vim.print()| ---@see https://github.com/kikito/inspect.lua ---@see https://github.com/mpeterv/vinspect +---@return string vim.inspect = vim.inspect do diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index ebd74046ce..d9d3c92a44 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -3297,8 +3297,8 @@ function vim.fn.getpid() end --- call setpos("'a", save_a_mark) --- <Also see |getcharpos()|, |getcurpos()| and |setpos()|. --- ---- @param expr any ---- @return any +--- @param expr string +--- @return integer[] function vim.fn.getpos(expr) end --- Returns a |List| with all the current quickfix errors. Each @@ -8827,8 +8827,8 @@ function vim.fn.stdioopen(opts) end --- echo stdpath("config") --- < --- ---- @param what any ---- @return any +--- @param what 'cache'|'config'|'config_dirs'|'data'|'data_dirs'|'log'|'run'|'state' +--- @return string|string[] function vim.fn.stdpath(what) end --- Convert String {string} to a Float. This mostly works the diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index bb642b97f8..a769983ca0 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -4092,7 +4092,8 @@ M.funcs = { ]=], name = 'getpos', - params = { { 'expr', 'any' } }, + params = { { 'expr', 'string' } }, + returns = 'integer[]', signature = 'getpos({expr})', }, getqflist = { @@ -10459,7 +10460,8 @@ M.funcs = { ]=], fast = true, name = 'stdpath', - params = { { 'what', 'any' } }, + params = { { 'what', "'cache'|'config'|'config_dirs'|'data'|'data_dirs'|'log'|'run'|'state'" } }, + returns = 'string|string[]', signature = 'stdpath({what})', }, state = { |