aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/vimfn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/_meta/vimfn.lua')
-rw-r--r--runtime/lua/vim/_meta/vimfn.lua58
1 files changed, 43 insertions, 15 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
index 84bb26a135..ad057d902b 100644
--- a/runtime/lua/vim/_meta/vimfn.lua
+++ b/runtime/lua/vim/_meta/vimfn.lua
@@ -2766,8 +2766,9 @@ function vim.fn.getchangelist(buf) end
--- endfunction
--- <
---
+--- @param expr? 0|1
--- @return integer
-function vim.fn.getchar() end
+function vim.fn.getchar(expr) end
--- The result is a Number which is the state of the modifiers for
--- the last obtained character with getchar() or in another way.
@@ -2837,8 +2838,9 @@ function vim.fn.getcharsearch() end
--- Otherwise this works like |getchar()|, except that a number
--- result is converted to a string.
---
+--- @param expr? 0|1
--- @return string
-function vim.fn.getcharstr() end
+function vim.fn.getcharstr(expr) end
--- Return the type of the current command-line completion.
--- Only works when the command line is being edited, thus
@@ -3249,8 +3251,8 @@ function vim.fn.getloclist(nr, what) end
--- Refer to |getpos()| for getting information about a specific
--- mark.
---
---- @param buf? any
---- @return any
+--- @param buf? integer?
+--- @return vim.fn.getmarklist.ret.item[]
function vim.fn.getmarklist(buf) end
--- Returns a |List| with all matches previously defined for the
@@ -4969,10 +4971,21 @@ function vim.fn.libcallnr(libname, funcname, argument) end
--- display isn't updated, e.g. in silent Ex mode)
--- w$ last line visible in current window (this is one
--- less than "w0" if no lines are visible)
---- v In Visual mode: the start of the Visual area (the
---- cursor is the end). When not in Visual mode
---- returns the cursor position. Differs from |'<| in
---- that it's updated right away.
+--- v When not in Visual mode, returns the cursor
+--- position. In Visual mode, returns the other end
+--- of the Visual area. A good way to think about
+--- this is that in Visual mode "v" and "." complement
+--- each other. While "." refers to the cursor
+--- position, "v" refers to where |v_o| would move the
+--- cursor. As a result, you can use "v" and "."
+--- together to work on all of a selection in
+--- characterwise visual mode. If the cursor is at
+--- the end of a characterwise visual area, "v" refers
+--- to the start of the same visual area. And if the
+--- cursor is at the start of a characterwise visual
+--- area, "v" refers to the end of the same visual
+--- area. "v" differs from |'<| and |'>| in that it's
+--- updated right away.
--- Note that a mark in another file can be used. The line number
--- then applies to another buffer.
--- To get the column number use |col()|. To get both use
@@ -5297,8 +5310,9 @@ function vim.fn.mapcheck(name, mode, abbr) end
--- ounmap xyzzy
--- echo printf("Operator-pending mode bit: 0x%x", op_bit)
---
---- @return any
-function vim.fn.maplist() end
+--- @param abbr? 0|1
+--- @return table[]
+function vim.fn.maplist(abbr) end
--- Like |map()| but instead of replacing items in {expr1} a new
--- List or Dictionary is created and returned. {expr1} remains
@@ -7634,8 +7648,15 @@ function vim.fn.searchdecl(name, global, thisblock) end
--- \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"')
--- <
---
---- @return any
-function vim.fn.searchpair() end
+--- @param start any
+--- @param middle any
+--- @param end_ any
+--- @param flags? string
+--- @param skip? any
+--- @param stopline? any
+--- @param timeout? integer
+--- @return integer
+function vim.fn.searchpair(start, middle, end_, flags, skip, stopline, timeout) end
--- Same as |searchpair()|, but returns a |List| with the line and
--- column position of the match. The first element of the |List|
@@ -7647,8 +7668,15 @@ function vim.fn.searchpair() end
--- <
--- See |match-parens| for a bigger and more useful example.
---
---- @return any
-function vim.fn.searchpairpos() end
+--- @param start any
+--- @param middle any
+--- @param end_ any
+--- @param flags? string
+--- @param skip? any
+--- @param stopline? any
+--- @param timeout? integer
+--- @return [integer, integer]
+function vim.fn.searchpairpos(start, middle, end_, flags, skip, stopline, timeout) end
--- Same as |search()|, but returns a |List| with the line and
--- column position of the match. The first element of the |List|
@@ -9796,7 +9824,7 @@ function vim.fn.synIDtrans(synID) end
---
--- @param lnum integer
--- @param col integer
---- @return {[1]: integer, [2]: string, [3]: integer}
+--- @return [integer, string, integer]
function vim.fn.synconcealed(lnum, col) end
--- Return a |List|, which is the stack of syntax items at the