mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 21:25:04 -07:00
fix(types): add more annotations to eval.lua
This commit is contained in:
parent
c2341df64a
commit
21152f7905
146
runtime/lua/vim/_meta/vimfn.lua
generated
146
runtime/lua/vim/_meta/vimfn.lua
generated
@ -1600,7 +1600,7 @@ function vim.fn.eventhandler() end
|
|||||||
--- |exepath()| can be used to get the full path of an executable.
|
--- |exepath()| can be used to get the full path of an executable.
|
||||||
---
|
---
|
||||||
--- @param expr any
|
--- @param expr any
|
||||||
--- @return any
|
--- @return 0|1|-1
|
||||||
function vim.fn.executable(expr) end
|
function vim.fn.executable(expr) end
|
||||||
|
|
||||||
--- Execute {command} and capture its output.
|
--- Execute {command} and capture its output.
|
||||||
@ -8957,7 +8957,7 @@ function vim.fn.strcharpart(src, start, len, skipcc) end
|
|||||||
---
|
---
|
||||||
--- @param string string
|
--- @param string string
|
||||||
--- @param skipcc? any
|
--- @param skipcc? any
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.strchars(string, skipcc) end
|
function vim.fn.strchars(string, skipcc) end
|
||||||
|
|
||||||
--- The result is a Number, which is the number of display cells
|
--- The result is a Number, which is the number of display cells
|
||||||
@ -8975,7 +8975,7 @@ function vim.fn.strchars(string, skipcc) end
|
|||||||
---
|
---
|
||||||
--- @param string string
|
--- @param string string
|
||||||
--- @param col? integer
|
--- @param col? integer
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.strdisplaywidth(string, col) end
|
function vim.fn.strdisplaywidth(string, col) end
|
||||||
|
|
||||||
--- The result is a String, which is a formatted date and time, as
|
--- The result is a String, which is a formatted date and time, as
|
||||||
@ -8996,7 +8996,7 @@ function vim.fn.strdisplaywidth(string, col) end
|
|||||||
---
|
---
|
||||||
--- @param format any
|
--- @param format any
|
||||||
--- @param time? any
|
--- @param time? any
|
||||||
--- @return any
|
--- @return string
|
||||||
function vim.fn.strftime(format, time) end
|
function vim.fn.strftime(format, time) end
|
||||||
|
|
||||||
--- Get a Number corresponding to the character at {index} in
|
--- Get a Number corresponding to the character at {index} in
|
||||||
@ -9007,9 +9007,9 @@ function vim.fn.strftime(format, time) end
|
|||||||
--- Returns -1 if {index} is invalid.
|
--- Returns -1 if {index} is invalid.
|
||||||
--- Also see |strcharpart()| and |strchars()|.
|
--- Also see |strcharpart()| and |strchars()|.
|
||||||
---
|
---
|
||||||
--- @param str any
|
--- @param str string
|
||||||
--- @param index any
|
--- @param index integer
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.strgetchar(str, index) end
|
function vim.fn.strgetchar(str, index) end
|
||||||
|
|
||||||
--- The result is a Number, which gives the byte index in
|
--- The result is a Number, which gives the byte index in
|
||||||
@ -9030,10 +9030,10 @@ function vim.fn.strgetchar(str, index) end
|
|||||||
--- stridx() works similar to the C function strstr(). When used
|
--- stridx() works similar to the C function strstr(). When used
|
||||||
--- with a single character it works similar to strchr().
|
--- with a single character it works similar to strchr().
|
||||||
---
|
---
|
||||||
--- @param haystack any
|
--- @param haystack string
|
||||||
--- @param needle any
|
--- @param needle string
|
||||||
--- @param start? any
|
--- @param start? integer
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.stridx(haystack, needle, start) end
|
function vim.fn.stridx(haystack, needle, start) end
|
||||||
|
|
||||||
--- Return {expr} converted to a String. If {expr} is a Number,
|
--- Return {expr} converted to a String. If {expr} is a Number,
|
||||||
@ -9060,7 +9060,7 @@ function vim.fn.stridx(haystack, needle, start) end
|
|||||||
--- share data with other application.
|
--- share data with other application.
|
||||||
---
|
---
|
||||||
--- @param expr any
|
--- @param expr any
|
||||||
--- @return any
|
--- @return string
|
||||||
function vim.fn.string(expr) end
|
function vim.fn.string(expr) end
|
||||||
|
|
||||||
--- The result is a Number, which is the length of the String
|
--- The result is a Number, which is the length of the String
|
||||||
@ -9072,7 +9072,7 @@ function vim.fn.string(expr) end
|
|||||||
--- Also see |len()|, |strdisplaywidth()| and |strwidth()|.
|
--- Also see |len()|, |strdisplaywidth()| and |strwidth()|.
|
||||||
---
|
---
|
||||||
--- @param string string
|
--- @param string string
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.strlen(string) end
|
function vim.fn.strlen(string) end
|
||||||
|
|
||||||
--- The result is a String, which is part of {src}, starting from
|
--- The result is a String, which is part of {src}, starting from
|
||||||
@ -9099,11 +9099,11 @@ function vim.fn.strlen(string) end
|
|||||||
--- <
|
--- <
|
||||||
--- Returns an empty string on error.
|
--- Returns an empty string on error.
|
||||||
---
|
---
|
||||||
--- @param src any
|
--- @param src string
|
||||||
--- @param start any
|
--- @param start integer
|
||||||
--- @param len? any
|
--- @param len? integer
|
||||||
--- @param chars? any
|
--- @param chars? 0|1
|
||||||
--- @return any
|
--- @return string
|
||||||
function vim.fn.strpart(src, start, len, chars) end
|
function vim.fn.strpart(src, start, len, chars) end
|
||||||
|
|
||||||
--- The result is a Number, which is a unix timestamp representing
|
--- The result is a Number, which is a unix timestamp representing
|
||||||
@ -9129,9 +9129,9 @@ function vim.fn.strpart(src, start, len, chars) end
|
|||||||
--- echo strftime("%c", strptime("%Y%m%d%H%M%S", "19970427115355") + 3600)
|
--- echo strftime("%c", strptime("%Y%m%d%H%M%S", "19970427115355") + 3600)
|
||||||
--- < Sun Apr 27 12:53:55 1997
|
--- < Sun Apr 27 12:53:55 1997
|
||||||
---
|
---
|
||||||
--- @param format any
|
--- @param format string
|
||||||
--- @param timestring any
|
--- @param timestring string
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.strptime(format, timestring) end
|
function vim.fn.strptime(format, timestring) end
|
||||||
|
|
||||||
--- The result is a Number, which gives the byte index in
|
--- The result is a Number, which gives the byte index in
|
||||||
@ -9151,10 +9151,10 @@ function vim.fn.strptime(format, timestring) end
|
|||||||
--- When used with a single character it works similar to the C
|
--- When used with a single character it works similar to the C
|
||||||
--- function strrchr().
|
--- function strrchr().
|
||||||
---
|
---
|
||||||
--- @param haystack any
|
--- @param haystack string
|
||||||
--- @param needle any
|
--- @param needle string
|
||||||
--- @param start? any
|
--- @param start? integer
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.strridx(haystack, needle, start) end
|
function vim.fn.strridx(haystack, needle, start) end
|
||||||
|
|
||||||
--- The result is a String, which is {string} with all unprintable
|
--- The result is a String, which is {string} with all unprintable
|
||||||
@ -9167,7 +9167,7 @@ function vim.fn.strridx(haystack, needle, start) end
|
|||||||
--- Returns an empty string on error.
|
--- Returns an empty string on error.
|
||||||
---
|
---
|
||||||
--- @param string string
|
--- @param string string
|
||||||
--- @return any
|
--- @return string
|
||||||
function vim.fn.strtrans(string) end
|
function vim.fn.strtrans(string) end
|
||||||
|
|
||||||
--- The result is a Number, which is the number of UTF-16 code
|
--- The result is a Number, which is the number of UTF-16 code
|
||||||
@ -9189,8 +9189,8 @@ function vim.fn.strtrans(string) end
|
|||||||
--- echo strutf16len('ą́', v:true) " returns 3
|
--- echo strutf16len('ą́', v:true) " returns 3
|
||||||
---
|
---
|
||||||
--- @param string string
|
--- @param string string
|
||||||
--- @param countcc? any
|
--- @param countcc? 0|1
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.strutf16len(string, countcc) end
|
function vim.fn.strutf16len(string, countcc) end
|
||||||
|
|
||||||
--- The result is a Number, which is the number of display cells
|
--- The result is a Number, which is the number of display cells
|
||||||
@ -9202,7 +9202,7 @@ function vim.fn.strutf16len(string, countcc) end
|
|||||||
--- Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
|
--- Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
|
||||||
---
|
---
|
||||||
--- @param string string
|
--- @param string string
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.strwidth(string) end
|
function vim.fn.strwidth(string) end
|
||||||
|
|
||||||
--- Only for an expression in a |:substitute| command or
|
--- Only for an expression in a |:substitute| command or
|
||||||
@ -9233,8 +9233,8 @@ function vim.fn.strwidth(string) end
|
|||||||
--- A line break is included as a newline character.
|
--- A line break is included as a newline character.
|
||||||
---
|
---
|
||||||
--- @param nr integer
|
--- @param nr integer
|
||||||
--- @param list? any
|
--- @param list? integer
|
||||||
--- @return any
|
--- @return string|string[]
|
||||||
function vim.fn.submatch(nr, list) end
|
function vim.fn.submatch(nr, list) end
|
||||||
|
|
||||||
--- The result is a String, which is a copy of {string}, in which
|
--- The result is a String, which is a copy of {string}, in which
|
||||||
@ -9280,10 +9280,10 @@ function vim.fn.submatch(nr, list) end
|
|||||||
--- <Returns an empty string on error.
|
--- <Returns an empty string on error.
|
||||||
---
|
---
|
||||||
--- @param string string
|
--- @param string string
|
||||||
--- @param pat any
|
--- @param pat string
|
||||||
--- @param sub any
|
--- @param sub string
|
||||||
--- @param flags string
|
--- @param flags string
|
||||||
--- @return any
|
--- @return string
|
||||||
function vim.fn.substitute(string, pat, sub, flags) end
|
function vim.fn.substitute(string, pat, sub, flags) end
|
||||||
|
|
||||||
--- Returns a list of swap file names, like what "vim -r" shows.
|
--- Returns a list of swap file names, like what "vim -r" shows.
|
||||||
@ -9296,7 +9296,7 @@ function vim.fn.substitute(string, pat, sub, flags) end
|
|||||||
--- let swapfiles = swapfilelist()
|
--- let swapfiles = swapfilelist()
|
||||||
--- let &directory = save_dir
|
--- let &directory = save_dir
|
||||||
---
|
---
|
||||||
--- @return any
|
--- @return string[]
|
||||||
function vim.fn.swapfilelist() end
|
function vim.fn.swapfilelist() end
|
||||||
|
|
||||||
--- The result is a dictionary, which holds information about the
|
--- The result is a dictionary, which holds information about the
|
||||||
@ -9326,8 +9326,8 @@ function vim.fn.swapinfo(fname) end
|
|||||||
--- |:swapname| (unless there is no swap file).
|
--- |:swapname| (unless there is no swap file).
|
||||||
--- If buffer {buf} has no swap file, returns an empty string.
|
--- If buffer {buf} has no swap file, returns an empty string.
|
||||||
---
|
---
|
||||||
--- @param buf any
|
--- @param buf integer|string
|
||||||
--- @return any
|
--- @return string
|
||||||
function vim.fn.swapname(buf) end
|
function vim.fn.swapname(buf) end
|
||||||
|
|
||||||
--- The result is a Number, which is the syntax ID at the position
|
--- The result is a Number, which is the syntax ID at the position
|
||||||
@ -9357,8 +9357,8 @@ function vim.fn.swapname(buf) end
|
|||||||
---
|
---
|
||||||
--- @param lnum integer
|
--- @param lnum integer
|
||||||
--- @param col integer
|
--- @param col integer
|
||||||
--- @param trans any
|
--- @param trans 0|1
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.synID(lnum, col, trans) end
|
function vim.fn.synID(lnum, col, trans) end
|
||||||
|
|
||||||
--- The result is a String, which is the {what} attribute of
|
--- The result is a String, which is the {what} attribute of
|
||||||
@ -9406,10 +9406,10 @@ function vim.fn.synID(lnum, col, trans) end
|
|||||||
--- echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg")
|
--- echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg")
|
||||||
--- <
|
--- <
|
||||||
---
|
---
|
||||||
--- @param synID any
|
--- @param synID integer
|
||||||
--- @param what any
|
--- @param what string
|
||||||
--- @param mode? string
|
--- @param mode? string
|
||||||
--- @return any
|
--- @return string
|
||||||
function vim.fn.synIDattr(synID, what, mode) end
|
function vim.fn.synIDattr(synID, what, mode) end
|
||||||
|
|
||||||
--- The result is a Number, which is the translated syntax ID of
|
--- The result is a Number, which is the translated syntax ID of
|
||||||
@ -9419,8 +9419,8 @@ function vim.fn.synIDattr(synID, what, mode) end
|
|||||||
---
|
---
|
||||||
--- Returns zero on error.
|
--- Returns zero on error.
|
||||||
---
|
---
|
||||||
--- @param synID any
|
--- @param synID integer
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.synIDtrans(synID) end
|
function vim.fn.synIDtrans(synID) end
|
||||||
|
|
||||||
--- The result is a |List| with currently three items:
|
--- The result is a |List| with currently three items:
|
||||||
@ -9450,7 +9450,7 @@ function vim.fn.synIDtrans(synID) end
|
|||||||
---
|
---
|
||||||
--- @param lnum integer
|
--- @param lnum integer
|
||||||
--- @param col integer
|
--- @param col integer
|
||||||
--- @return any
|
--- @return {[1]: integer, [2]: string, [3]: integer}[]
|
||||||
function vim.fn.synconcealed(lnum, col) end
|
function vim.fn.synconcealed(lnum, col) end
|
||||||
|
|
||||||
--- Return a |List|, which is the stack of syntax items at the
|
--- Return a |List|, which is the stack of syntax items at the
|
||||||
@ -9473,7 +9473,7 @@ function vim.fn.synconcealed(lnum, col) end
|
|||||||
---
|
---
|
||||||
--- @param lnum integer
|
--- @param lnum integer
|
||||||
--- @param col integer
|
--- @param col integer
|
||||||
--- @return any
|
--- @return integer[]
|
||||||
function vim.fn.synstack(lnum, col) end
|
function vim.fn.synstack(lnum, col) end
|
||||||
|
|
||||||
--- Note: Prefer |vim.system()| in Lua.
|
--- Note: Prefer |vim.system()| in Lua.
|
||||||
@ -9524,9 +9524,9 @@ function vim.fn.synstack(lnum, col) end
|
|||||||
--- <Unlike ":!cmd" there is no automatic check for changed files.
|
--- <Unlike ":!cmd" there is no automatic check for changed files.
|
||||||
--- Use |:checktime| to force a check.
|
--- Use |:checktime| to force a check.
|
||||||
---
|
---
|
||||||
--- @param cmd any
|
--- @param cmd string|string[]
|
||||||
--- @param input? any
|
--- @param input? string|string[]|integer
|
||||||
--- @return any
|
--- @return string
|
||||||
function vim.fn.system(cmd, input) end
|
function vim.fn.system(cmd, input) end
|
||||||
|
|
||||||
--- Same as |system()|, but returns a |List| with lines (parts of
|
--- Same as |system()|, but returns a |List| with lines (parts of
|
||||||
@ -9542,10 +9542,10 @@ function vim.fn.system(cmd, input) end
|
|||||||
--- <
|
--- <
|
||||||
--- Returns an empty string on error.
|
--- Returns an empty string on error.
|
||||||
---
|
---
|
||||||
--- @param cmd any
|
--- @param cmd string|string[]
|
||||||
--- @param input? any
|
--- @param input? string|string[]|integer
|
||||||
--- @param keepempty? any
|
--- @param keepempty? integer
|
||||||
--- @return any
|
--- @return string[]
|
||||||
function vim.fn.systemlist(cmd, input, keepempty) end
|
function vim.fn.systemlist(cmd, input, keepempty) end
|
||||||
|
|
||||||
--- The result is a |List|, where each item is the number of the
|
--- The result is a |List|, where each item is the number of the
|
||||||
@ -9577,8 +9577,8 @@ function vim.fn.tabpagebuflist(arg) end
|
|||||||
---
|
---
|
||||||
--- Returns zero on error.
|
--- Returns zero on error.
|
||||||
---
|
---
|
||||||
--- @param arg? any
|
--- @param arg? '$'|'#'
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.tabpagenr(arg) end
|
function vim.fn.tabpagenr(arg) end
|
||||||
|
|
||||||
--- Like |winnr()| but for tab page {tabarg}.
|
--- Like |winnr()| but for tab page {tabarg}.
|
||||||
@ -9593,15 +9593,15 @@ function vim.fn.tabpagenr(arg) end
|
|||||||
--- tabpagewinnr(4, '$') " number of windows in tab page 4
|
--- tabpagewinnr(4, '$') " number of windows in tab page 4
|
||||||
--- <When {tabarg} is invalid zero is returned.
|
--- <When {tabarg} is invalid zero is returned.
|
||||||
---
|
---
|
||||||
--- @param tabarg any
|
--- @param tabarg integer
|
||||||
--- @param arg? any
|
--- @param arg? '$'|'#'
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.tabpagewinnr(tabarg, arg) end
|
function vim.fn.tabpagewinnr(tabarg, arg) end
|
||||||
|
|
||||||
--- Returns a |List| with the file names used to search for tags
|
--- Returns a |List| with the file names used to search for tags
|
||||||
--- for the current buffer. This is the 'tags' option expanded.
|
--- for the current buffer. This is the 'tags' option expanded.
|
||||||
---
|
---
|
||||||
--- @return any
|
--- @return string[]
|
||||||
function vim.fn.tagfiles() end
|
function vim.fn.tagfiles() end
|
||||||
|
|
||||||
--- Returns a |List| of tags matching the regular expression {expr}.
|
--- Returns a |List| of tags matching the regular expression {expr}.
|
||||||
@ -9647,7 +9647,7 @@ function vim.fn.tagfiles() end
|
|||||||
--- the tags file generated by the different ctags tools.
|
--- the tags file generated by the different ctags tools.
|
||||||
---
|
---
|
||||||
--- @param expr any
|
--- @param expr any
|
||||||
--- @param filename? any
|
--- @param filename? string
|
||||||
--- @return any
|
--- @return any
|
||||||
function vim.fn.taglist(expr, filename) end
|
function vim.fn.taglist(expr, filename) end
|
||||||
|
|
||||||
@ -9661,8 +9661,8 @@ function vim.fn.taglist(expr, filename) end
|
|||||||
--- echo tan(-4.01)
|
--- echo tan(-4.01)
|
||||||
--- < -1.181502
|
--- < -1.181502
|
||||||
---
|
---
|
||||||
--- @param expr any
|
--- @param expr number
|
||||||
--- @return any
|
--- @return number
|
||||||
function vim.fn.tan(expr) end
|
function vim.fn.tan(expr) end
|
||||||
|
|
||||||
--- Return the hyperbolic tangent of {expr} as a |Float| in the
|
--- Return the hyperbolic tangent of {expr} as a |Float| in the
|
||||||
@ -9675,8 +9675,8 @@ function vim.fn.tan(expr) end
|
|||||||
--- echo tanh(-1)
|
--- echo tanh(-1)
|
||||||
--- < -0.761594
|
--- < -0.761594
|
||||||
---
|
---
|
||||||
--- @param expr any
|
--- @param expr number
|
||||||
--- @return any
|
--- @return number
|
||||||
function vim.fn.tanh(expr) end
|
function vim.fn.tanh(expr) end
|
||||||
|
|
||||||
--- Generates a (non-existent) filename located in the Nvim root
|
--- Generates a (non-existent) filename located in the Nvim root
|
||||||
@ -9824,10 +9824,10 @@ function vim.fn.toupper(expr) end
|
|||||||
--- echo tr("<blob>", "<>", "{}")
|
--- echo tr("<blob>", "<>", "{}")
|
||||||
--- <returns "{blob}"
|
--- <returns "{blob}"
|
||||||
---
|
---
|
||||||
--- @param src any
|
--- @param src string
|
||||||
--- @param fromstr any
|
--- @param fromstr string
|
||||||
--- @param tostr any
|
--- @param tostr string
|
||||||
--- @return any
|
--- @return string
|
||||||
function vim.fn.tr(src, fromstr, tostr) end
|
function vim.fn.tr(src, fromstr, tostr) end
|
||||||
|
|
||||||
--- Return {text} as a String where any character in {mask} is
|
--- Return {text} as a String where any character in {mask} is
|
||||||
@ -9855,8 +9855,8 @@ function vim.fn.tr(src, fromstr, tostr) end
|
|||||||
--- <returns " vim"
|
--- <returns " vim"
|
||||||
---
|
---
|
||||||
--- @param text any
|
--- @param text any
|
||||||
--- @param mask? any
|
--- @param mask? string
|
||||||
--- @param dir? string
|
--- @param dir? 0|1|2
|
||||||
--- @return string
|
--- @return string
|
||||||
function vim.fn.trim(text, mask, dir) end
|
function vim.fn.trim(text, mask, dir) end
|
||||||
|
|
||||||
@ -9873,7 +9873,7 @@ function vim.fn.trim(text, mask, dir) end
|
|||||||
--- < 4.0
|
--- < 4.0
|
||||||
---
|
---
|
||||||
--- @param expr any
|
--- @param expr any
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.trunc(expr) end
|
function vim.fn.trunc(expr) end
|
||||||
|
|
||||||
--- The result is a Number representing the type of {expr}.
|
--- The result is a Number representing the type of {expr}.
|
||||||
@ -9903,7 +9903,7 @@ function vim.fn.trunc(expr) end
|
|||||||
--- if exists('v:t_number') | endif
|
--- if exists('v:t_number') | endif
|
||||||
---
|
---
|
||||||
--- @param expr any
|
--- @param expr any
|
||||||
--- @return any
|
--- @return integer
|
||||||
function vim.fn.type(expr) end
|
function vim.fn.type(expr) end
|
||||||
|
|
||||||
--- Return the name of the undo file that would be used for a file
|
--- Return the name of the undo file that would be used for a file
|
||||||
@ -9963,7 +9963,7 @@ function vim.fn.undofile(name) end
|
|||||||
--- blocks. Each item may again have an "alt"
|
--- blocks. Each item may again have an "alt"
|
||||||
--- item.
|
--- item.
|
||||||
---
|
---
|
||||||
--- @param buf? any
|
--- @param buf? integer|string
|
||||||
--- @return any
|
--- @return any
|
||||||
function vim.fn.undotree(buf) end
|
function vim.fn.undotree(buf) end
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ M.funcs = {
|
|||||||
name = 'abs',
|
name = 'abs',
|
||||||
params = { { 'expr', 'any' } },
|
params = { { 'expr', 'any' } },
|
||||||
signature = 'abs({expr})',
|
signature = 'abs({expr})',
|
||||||
returns = 'number'
|
returns = 'number',
|
||||||
},
|
},
|
||||||
acos = {
|
acos = {
|
||||||
args = 1,
|
args = 1,
|
||||||
@ -2075,6 +2075,7 @@ M.funcs = {
|
|||||||
fast = true,
|
fast = true,
|
||||||
name = 'executable',
|
name = 'executable',
|
||||||
params = { { 'expr', 'any' } },
|
params = { { 'expr', 'any' } },
|
||||||
|
returns = '0|1|-1',
|
||||||
signature = 'executable({expr})',
|
signature = 'executable({expr})',
|
||||||
},
|
},
|
||||||
execute = {
|
execute = {
|
||||||
@ -6189,7 +6190,12 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'maparg',
|
name = 'maparg',
|
||||||
params = { { 'name', 'string' }, { 'mode', 'string' }, { 'abbr', 'boolean' }, { 'dict', 'boolean' } },
|
params = {
|
||||||
|
{ 'name', 'string' },
|
||||||
|
{ 'mode', 'string' },
|
||||||
|
{ 'abbr', 'boolean' },
|
||||||
|
{ 'dict', 'boolean' },
|
||||||
|
},
|
||||||
returns = 'string|table<string,any>',
|
returns = 'string|table<string,any>',
|
||||||
signature = 'maparg({name} [, {mode} [, {abbr} [, {dict}]]])',
|
signature = 'maparg({name} [, {mode} [, {abbr} [, {dict}]]])',
|
||||||
},
|
},
|
||||||
@ -10644,6 +10650,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'strchars',
|
name = 'strchars',
|
||||||
params = { { 'string', 'string' }, { 'skipcc', 'any' } },
|
params = { { 'string', 'string' }, { 'skipcc', 'any' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'strchars({string} [, {skipcc}])',
|
signature = 'strchars({string} [, {skipcc}])',
|
||||||
},
|
},
|
||||||
strdisplaywidth = {
|
strdisplaywidth = {
|
||||||
@ -10666,6 +10673,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'strdisplaywidth',
|
name = 'strdisplaywidth',
|
||||||
params = { { 'string', 'string' }, { 'col', 'integer' } },
|
params = { { 'string', 'string' }, { 'col', 'integer' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'strdisplaywidth({string} [, {col}])',
|
signature = 'strdisplaywidth({string} [, {col}])',
|
||||||
},
|
},
|
||||||
strftime = {
|
strftime = {
|
||||||
@ -10691,6 +10699,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'strftime',
|
name = 'strftime',
|
||||||
params = { { 'format', 'any' }, { 'time', 'any' } },
|
params = { { 'format', 'any' }, { 'time', 'any' } },
|
||||||
|
returns = 'string',
|
||||||
signature = 'strftime({format} [, {time}])',
|
signature = 'strftime({format} [, {time}])',
|
||||||
},
|
},
|
||||||
strgetchar = {
|
strgetchar = {
|
||||||
@ -10707,7 +10716,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'strgetchar',
|
name = 'strgetchar',
|
||||||
params = { { 'str', 'any' }, { 'index', 'any' } },
|
params = { { 'str', 'string' }, { 'index', 'integer' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'strgetchar({str}, {index})',
|
signature = 'strgetchar({str}, {index})',
|
||||||
},
|
},
|
||||||
stridx = {
|
stridx = {
|
||||||
@ -10735,7 +10745,8 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
fast = true,
|
fast = true,
|
||||||
name = 'stridx',
|
name = 'stridx',
|
||||||
params = { { 'haystack', 'any' }, { 'needle', 'any' }, { 'start', 'any' } },
|
params = { { 'haystack', 'string' }, { 'needle', 'string' }, { 'start', 'integer' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'stridx({haystack}, {needle} [, {start}])',
|
signature = 'stridx({haystack}, {needle} [, {start}])',
|
||||||
},
|
},
|
||||||
string = {
|
string = {
|
||||||
@ -10768,6 +10779,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'string',
|
name = 'string',
|
||||||
params = { { 'expr', 'any' } },
|
params = { { 'expr', 'any' } },
|
||||||
|
returns = 'string',
|
||||||
signature = 'string({expr})',
|
signature = 'string({expr})',
|
||||||
},
|
},
|
||||||
strlen = {
|
strlen = {
|
||||||
@ -10785,6 +10797,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'strlen',
|
name = 'strlen',
|
||||||
params = { { 'string', 'string' } },
|
params = { { 'string', 'string' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'strlen({string})',
|
signature = 'strlen({string})',
|
||||||
},
|
},
|
||||||
strpart = {
|
strpart = {
|
||||||
@ -10818,7 +10831,13 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
fast = true,
|
fast = true,
|
||||||
name = 'strpart',
|
name = 'strpart',
|
||||||
params = { { 'src', 'any' }, { 'start', 'any' }, { 'len', 'any' }, { 'chars', 'any' } },
|
params = {
|
||||||
|
{ 'src', 'string' },
|
||||||
|
{ 'start', 'integer' },
|
||||||
|
{ 'len', 'integer' },
|
||||||
|
{ 'chars', '0|1' },
|
||||||
|
},
|
||||||
|
returns = 'string',
|
||||||
signature = 'strpart({src}, {start} [, {len} [, {chars}]])',
|
signature = 'strpart({src}, {start} [, {len} [, {chars}]])',
|
||||||
},
|
},
|
||||||
strptime = {
|
strptime = {
|
||||||
@ -10850,7 +10869,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'strptime',
|
name = 'strptime',
|
||||||
params = { { 'format', 'any' }, { 'timestring', 'any' } },
|
params = { { 'format', 'string' }, { 'timestring', 'string' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'strptime({format}, {timestring})',
|
signature = 'strptime({format}, {timestring})',
|
||||||
},
|
},
|
||||||
strridx = {
|
strridx = {
|
||||||
@ -10876,7 +10896,12 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'strridx',
|
name = 'strridx',
|
||||||
params = { { 'haystack', 'any' }, { 'needle', 'any' }, { 'start', 'any' } },
|
params = {
|
||||||
|
{ 'haystack', 'string' },
|
||||||
|
{ 'needle', 'string' },
|
||||||
|
{ 'start', 'integer' },
|
||||||
|
},
|
||||||
|
returns = 'integer',
|
||||||
signature = 'strridx({haystack}, {needle} [, {start}])',
|
signature = 'strridx({haystack}, {needle} [, {start}])',
|
||||||
},
|
},
|
||||||
strtrans = {
|
strtrans = {
|
||||||
@ -10896,6 +10921,7 @@ M.funcs = {
|
|||||||
fast = true,
|
fast = true,
|
||||||
name = 'strtrans',
|
name = 'strtrans',
|
||||||
params = { { 'string', 'string' } },
|
params = { { 'string', 'string' } },
|
||||||
|
returns = 'string',
|
||||||
signature = 'strtrans({string})',
|
signature = 'strtrans({string})',
|
||||||
},
|
},
|
||||||
strutf16len = {
|
strutf16len = {
|
||||||
@ -10922,7 +10948,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'strutf16len',
|
name = 'strutf16len',
|
||||||
params = { { 'string', 'string' }, { 'countcc', 'any' } },
|
params = { { 'string', 'string' }, { 'countcc', '0|1' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'strutf16len({string} [, {countcc}])',
|
signature = 'strutf16len({string} [, {countcc}])',
|
||||||
},
|
},
|
||||||
strwidth = {
|
strwidth = {
|
||||||
@ -10941,6 +10968,7 @@ M.funcs = {
|
|||||||
fast = true,
|
fast = true,
|
||||||
name = 'strwidth',
|
name = 'strwidth',
|
||||||
params = { { 'string', 'string' } },
|
params = { { 'string', 'string' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'strwidth({string})',
|
signature = 'strwidth({string})',
|
||||||
},
|
},
|
||||||
submatch = {
|
submatch = {
|
||||||
@ -10977,7 +11005,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'submatch',
|
name = 'submatch',
|
||||||
params = { { 'nr', 'integer' }, { 'list', 'any' } },
|
params = { { 'nr', 'integer' }, { 'list', 'integer' } },
|
||||||
|
returns = 'string|string[]',
|
||||||
signature = 'submatch({nr} [, {list}])',
|
signature = 'submatch({nr} [, {list}])',
|
||||||
},
|
},
|
||||||
substitute = {
|
substitute = {
|
||||||
@ -11028,7 +11057,13 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'substitute',
|
name = 'substitute',
|
||||||
params = { { 'string', 'string' }, { 'pat', 'any' }, { 'sub', 'any' }, { 'flags', 'string' } },
|
params = {
|
||||||
|
{ 'string', 'string' },
|
||||||
|
{ 'pat', 'string' },
|
||||||
|
{ 'sub', 'string' },
|
||||||
|
{ 'flags', 'string' },
|
||||||
|
},
|
||||||
|
returns = 'string',
|
||||||
signature = 'substitute({string}, {pat}, {sub}, {flags})',
|
signature = 'substitute({string}, {pat}, {sub}, {flags})',
|
||||||
},
|
},
|
||||||
swapfilelist = {
|
swapfilelist = {
|
||||||
@ -11045,6 +11080,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'swapfilelist',
|
name = 'swapfilelist',
|
||||||
params = {},
|
params = {},
|
||||||
|
returns = 'string[]',
|
||||||
signature = 'swapfilelist()',
|
signature = 'swapfilelist()',
|
||||||
},
|
},
|
||||||
swapinfo = {
|
swapinfo = {
|
||||||
@ -11085,7 +11121,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'swapname',
|
name = 'swapname',
|
||||||
params = { { 'buf', 'any' } },
|
params = { { 'buf', 'integer|string' } },
|
||||||
|
returns = 'string',
|
||||||
signature = 'swapname({buf})',
|
signature = 'swapname({buf})',
|
||||||
},
|
},
|
||||||
synID = {
|
synID = {
|
||||||
@ -11117,7 +11154,8 @@ M.funcs = {
|
|||||||
<
|
<
|
||||||
]=],
|
]=],
|
||||||
name = 'synID',
|
name = 'synID',
|
||||||
params = { { 'lnum', 'integer' }, { 'col', 'integer' }, { 'trans', 'any' } },
|
params = { { 'lnum', 'integer' }, { 'col', 'integer' }, { 'trans', '0|1' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'synID({lnum}, {col}, {trans})',
|
signature = 'synID({lnum}, {col}, {trans})',
|
||||||
},
|
},
|
||||||
synIDattr = {
|
synIDattr = {
|
||||||
@ -11170,7 +11208,8 @@ M.funcs = {
|
|||||||
<
|
<
|
||||||
]=],
|
]=],
|
||||||
name = 'synIDattr',
|
name = 'synIDattr',
|
||||||
params = { { 'synID', 'any' }, { 'what', 'any' }, { 'mode', 'string' } },
|
params = { { 'synID', 'integer' }, { 'what', 'string' }, { 'mode', 'string' } },
|
||||||
|
returns = 'string',
|
||||||
signature = 'synIDattr({synID}, {what} [, {mode}])',
|
signature = 'synIDattr({synID}, {what} [, {mode}])',
|
||||||
},
|
},
|
||||||
synIDtrans = {
|
synIDtrans = {
|
||||||
@ -11186,7 +11225,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'synIDtrans',
|
name = 'synIDtrans',
|
||||||
params = { { 'synID', 'any' } },
|
params = { { 'synID', 'integer' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'synIDtrans({synID})',
|
signature = 'synIDtrans({synID})',
|
||||||
},
|
},
|
||||||
synconcealed = {
|
synconcealed = {
|
||||||
@ -11219,6 +11259,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'synconcealed',
|
name = 'synconcealed',
|
||||||
params = { { 'lnum', 'integer' }, { 'col', 'integer' } },
|
params = { { 'lnum', 'integer' }, { 'col', 'integer' } },
|
||||||
|
returns = '{[1]: integer, [2]: string, [3]: integer}[]',
|
||||||
signature = 'synconcealed({lnum}, {col})',
|
signature = 'synconcealed({lnum}, {col})',
|
||||||
},
|
},
|
||||||
synstack = {
|
synstack = {
|
||||||
@ -11244,6 +11285,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'synstack',
|
name = 'synstack',
|
||||||
params = { { 'lnum', 'integer' }, { 'col', 'integer' } },
|
params = { { 'lnum', 'integer' }, { 'col', 'integer' } },
|
||||||
|
returns = 'integer[]',
|
||||||
signature = 'synstack({lnum}, {col})',
|
signature = 'synstack({lnum}, {col})',
|
||||||
},
|
},
|
||||||
system = {
|
system = {
|
||||||
@ -11301,7 +11343,11 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'system',
|
name = 'system',
|
||||||
params = { { 'cmd', 'any' }, { 'input', 'any' } },
|
params = {
|
||||||
|
{ 'cmd', 'string|string[]' },
|
||||||
|
{ 'input', 'string|string[]|integer' },
|
||||||
|
},
|
||||||
|
returns = 'string',
|
||||||
signature = 'system({cmd} [, {input}])',
|
signature = 'system({cmd} [, {input}])',
|
||||||
},
|
},
|
||||||
systemlist = {
|
systemlist = {
|
||||||
@ -11323,7 +11369,14 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'systemlist',
|
name = 'systemlist',
|
||||||
params = { { 'cmd', 'any' }, { 'input', 'any' }, { 'keepempty', 'any' } },
|
params = {
|
||||||
|
{ 'cmd', 'string|string[]' },
|
||||||
|
{ 'input', 'string|string[]|integer' },
|
||||||
|
{ 'keepempty', 'integer' },
|
||||||
|
},
|
||||||
|
-- TODO(lewis6991): Not sure the '' return case is possible via vim.fn
|
||||||
|
-- returns = "string[]|''",
|
||||||
|
returns = 'string[]',
|
||||||
signature = 'systemlist({cmd} [, {input} [, {keepempty}]])',
|
signature = 'systemlist({cmd} [, {input} [, {keepempty}]])',
|
||||||
},
|
},
|
||||||
tabpagebuflist = {
|
tabpagebuflist = {
|
||||||
@ -11364,7 +11417,8 @@ M.funcs = {
|
|||||||
Returns zero on error.
|
Returns zero on error.
|
||||||
]=],
|
]=],
|
||||||
name = 'tabpagenr',
|
name = 'tabpagenr',
|
||||||
params = { { 'arg', 'any' } },
|
params = { { 'arg', "'$'|'#'" } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'tabpagenr([{arg}])',
|
signature = 'tabpagenr([{arg}])',
|
||||||
},
|
},
|
||||||
tabpagewinnr = {
|
tabpagewinnr = {
|
||||||
@ -11385,7 +11439,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'tabpagewinnr',
|
name = 'tabpagewinnr',
|
||||||
params = { { 'tabarg', 'any' }, { 'arg', 'any' } },
|
params = { { 'tabarg', 'integer' }, { 'arg', "'$'|'#'" } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'tabpagewinnr({tabarg} [, {arg}])',
|
signature = 'tabpagewinnr({tabarg} [, {arg}])',
|
||||||
},
|
},
|
||||||
tagfiles = {
|
tagfiles = {
|
||||||
@ -11395,6 +11450,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'tagfiles',
|
name = 'tagfiles',
|
||||||
params = {},
|
params = {},
|
||||||
|
returns = 'string[]',
|
||||||
signature = 'tagfiles()',
|
signature = 'tagfiles()',
|
||||||
},
|
},
|
||||||
taglist = {
|
taglist = {
|
||||||
@ -11445,7 +11501,7 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'taglist',
|
name = 'taglist',
|
||||||
params = { { 'expr', 'any' }, { 'filename', 'any' } },
|
params = { { 'expr', 'any' }, { 'filename', 'string' } },
|
||||||
signature = 'taglist({expr} [, {filename}])',
|
signature = 'taglist({expr} [, {filename}])',
|
||||||
},
|
},
|
||||||
tan = {
|
tan = {
|
||||||
@ -11465,7 +11521,8 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
float_func = 'tan',
|
float_func = 'tan',
|
||||||
name = 'tan',
|
name = 'tan',
|
||||||
params = { { 'expr', 'any' } },
|
params = { { 'expr', 'number' } },
|
||||||
|
returns = 'number',
|
||||||
signature = 'tan({expr})',
|
signature = 'tan({expr})',
|
||||||
},
|
},
|
||||||
tanh = {
|
tanh = {
|
||||||
@ -11485,7 +11542,8 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
float_func = 'tanh',
|
float_func = 'tanh',
|
||||||
name = 'tanh',
|
name = 'tanh',
|
||||||
params = { { 'expr', 'any' } },
|
params = { { 'expr', 'number' } },
|
||||||
|
returns = 'number',
|
||||||
signature = 'tanh({expr})',
|
signature = 'tanh({expr})',
|
||||||
},
|
},
|
||||||
tempname = {
|
tempname = {
|
||||||
@ -11537,7 +11595,7 @@ M.funcs = {
|
|||||||
},
|
},
|
||||||
test_write_list_log = {
|
test_write_list_log = {
|
||||||
args = 1,
|
args = 1,
|
||||||
params = { { 'fname' } },
|
params = { { 'fname', 'string' } },
|
||||||
signature = '',
|
signature = '',
|
||||||
lua = false,
|
lua = false,
|
||||||
},
|
},
|
||||||
@ -11699,7 +11757,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'tr',
|
name = 'tr',
|
||||||
params = { { 'src', 'any' }, { 'fromstr', 'any' }, { 'tostr', 'any' } },
|
params = { { 'src', 'string' }, { 'fromstr', 'string' }, { 'tostr', 'string' } },
|
||||||
|
returns = 'string',
|
||||||
signature = 'tr({src}, {fromstr}, {tostr})',
|
signature = 'tr({src}, {fromstr}, {tostr})',
|
||||||
},
|
},
|
||||||
trim = {
|
trim = {
|
||||||
@ -11732,7 +11791,7 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'trim',
|
name = 'trim',
|
||||||
params = { { 'text', 'any' }, { 'mask', 'any' }, { 'dir', 'string' } },
|
params = { { 'text', 'any' }, { 'mask', 'string' }, { 'dir', '0|1|2' } },
|
||||||
returns = 'string',
|
returns = 'string',
|
||||||
signature = 'trim({text} [, {mask} [, {dir}]])',
|
signature = 'trim({text} [, {mask} [, {dir}]])',
|
||||||
},
|
},
|
||||||
@ -11756,6 +11815,7 @@ M.funcs = {
|
|||||||
float_func = 'trunc',
|
float_func = 'trunc',
|
||||||
name = 'trunc',
|
name = 'trunc',
|
||||||
params = { { 'expr', 'any' } },
|
params = { { 'expr', 'any' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'trunc({expr})',
|
signature = 'trunc({expr})',
|
||||||
},
|
},
|
||||||
type = {
|
type = {
|
||||||
@ -11792,6 +11852,7 @@ M.funcs = {
|
|||||||
fast = true,
|
fast = true,
|
||||||
name = 'type',
|
name = 'type',
|
||||||
params = { { 'expr', 'any' } },
|
params = { { 'expr', 'any' } },
|
||||||
|
returns = 'integer',
|
||||||
signature = 'type({expr})',
|
signature = 'type({expr})',
|
||||||
},
|
},
|
||||||
undofile = {
|
undofile = {
|
||||||
@ -11862,7 +11923,7 @@ M.funcs = {
|
|||||||
item.
|
item.
|
||||||
]=],
|
]=],
|
||||||
name = 'undotree',
|
name = 'undotree',
|
||||||
params = { { 'buf', 'any' } },
|
params = { { 'buf', 'integer|string' } },
|
||||||
signature = 'undotree([{buf}])',
|
signature = 'undotree([{buf}])',
|
||||||
},
|
},
|
||||||
uniq = {
|
uniq = {
|
||||||
|
Loading…
Reference in New Issue
Block a user