diff options
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r-- | runtime/doc/lua.txt | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 1c3a7f70c9..9601537c8d 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -861,6 +861,9 @@ schedule_wrap({cb}) *vim.schedule_wrap()* +deep_equal({a}, {b}) *vim.deep_equal()* + TODO: Documentation + deepcopy({orig}) *vim.deepcopy()* Returns a deep copy of the given object. Non-table objects are copied as in a typical Lua assignment, whereas table objects @@ -889,6 +892,45 @@ gsplit({s}, {sep}, {plain}) *vim.gsplit()* https://www.lua.org/pil/20.2.html http://lua-users.org/wiki/StringLibraryTutorial +is_callable({f}) *vim.is_callable()* + Returns true if object `f` can be called as a function. + + Parameters: ~ + {f} Any object + + Return: ~ + true if `f` is callable, else false + +list_extend({dst}, {src}, {start}, {finish}) *vim.list_extend()* + Extends a list-like table with the values of another list-like + table. + + NOTE: This mutates dst! + + Parameters: ~ + {dst} list which will be modified and appended to. + {src} list from which values will be inserted. + {start} Start index on src. defaults to 1 + {finish} Final index on src. defaults to #src + + Return: ~ + dst + + See also: ~ + |vim.tbl_extend()| + +pesc({s}) *vim.pesc()* + Escapes magic chars in a Lua pattern string. + + Parameters: ~ + {s} String to escape + + Return: ~ + %-escaped pattern string + + See also: ~ + https://github.com/rxi/lume + split({s}, {sep}, {plain}) *vim.split()* Splits a string at each instance of a separator. @@ -910,28 +952,13 @@ split({s}, {sep}, {plain}) *vim.split()* See also: ~ |vim.gsplit()| -tbl_keys({t}) *vim.tbl_keys()* - Return a list of all keys used in a table. However, the order - of the return table of keys is not guaranteed. - - Parameters: ~ - {t} Table - - Return: ~ - list of keys - - See also: ~ - Fromhttps://github.com/premake/premake-core/blob/master/src/base/table.lua - -tbl_values({t}) *vim.tbl_values()* - Return a list of all values used in a table. However, the - order of the return table of values is not guaranteed. +tbl_add_reverse_lookup({o}) *vim.tbl_add_reverse_lookup()* + Add the reverse lookup values to an existing table. For + example: `tbl_add_reverse_lookup { A = 1 } == { [1] = 'A', A = + 1 }` Parameters: ~ - {t} Table - - Return: ~ - list of values + {o} table The table to add the reverse to. tbl_contains({t}, {value}) *vim.tbl_contains()* Checks if a list-like (vector) table contains `value` . @@ -943,10 +970,6 @@ tbl_contains({t}, {value}) *vim.tbl_contains()* Return: ~ true if `t` contains `value` -tbl_isempty({t}) *vim.tbl_isempty()* - See also: ~ - Fromhttps://github.com/premake/premake-core/blob/master/src/base/table.lua@paramt Table to check - tbl_extend({behavior}, {...}) *vim.tbl_extend()* Merges two or more map-like tables. @@ -961,35 +984,6 @@ tbl_extend({behavior}, {...}) *vim.tbl_extend()* See also: ~ |extend()| -deep_equal({a}, {b}) *vim.deep_equal()* - TODO: Documentation - -tbl_add_reverse_lookup({o}) *vim.tbl_add_reverse_lookup()* - Add the reverse lookup values to an existing table. For - example: `tbl_add_reverse_lookup { A = 1 } == { [1] = 'A', A = - 1 }` - - Parameters: ~ - {o} table The table to add the reverse to. - -list_extend({dst}, {src}, {start}, {finish}) *vim.list_extend()* - Extends a list-like table with the values of another list-like - table. - - NOTE: This mutates dst! - - Parameters: ~ - {dst} list which will be modified and appended to. - {src} list from which values will be inserted. - {start} Start index on src. defaults to 1 - {finish} Final index on src. defaults to #src - - Return: ~ - dst - - See also: ~ - |vim.tbl_extend()| - tbl_flatten({t}) *vim.tbl_flatten()* Creates a copy of a list-like table such that any nested tables are "unrolled" and appended to the result. @@ -1003,6 +997,10 @@ tbl_flatten({t}) *vim.tbl_flatten()* See also: ~ Fromhttps://github.com/premake/premake-core/blob/master/src/base/table.lua +tbl_isempty({t}) *vim.tbl_isempty()* + See also: ~ + Fromhttps://github.com/premake/premake-core/blob/master/src/base/table.lua@paramt Table to check + tbl_islist({t}) *vim.tbl_islist()* Table @@ -1010,30 +1008,41 @@ tbl_islist({t}) *vim.tbl_islist()* true: A non-empty array, false: A non-empty table, nil: An empty table -trim({s}) *vim.trim()* - Trim whitespace (Lua pattern "%s") from both sides of a - string. +tbl_keys({t}) *vim.tbl_keys()* + Return a list of all keys used in a table. However, the order + of the return table of keys is not guaranteed. Parameters: ~ - {s} String to trim + {t} Table Return: ~ - String with whitespace removed from its beginning and end + list of keys See also: ~ - https://www.lua.org/pil/20.2.html + Fromhttps://github.com/premake/premake-core/blob/master/src/base/table.lua -pesc({s}) *vim.pesc()* - Escapes magic chars in a Lua pattern string. +tbl_values({t}) *vim.tbl_values()* + Return a list of all values used in a table. However, the + order of the return table of values is not guaranteed. Parameters: ~ - {s} String to escape + {t} Table Return: ~ - %-escaped pattern string + list of values + +trim({s}) *vim.trim()* + Trim whitespace (Lua pattern "%s") from both sides of a + string. + + Parameters: ~ + {s} String to trim + + Return: ~ + String with whitespace removed from its beginning and end See also: ~ - https://github.com/rxi/lume + https://www.lua.org/pil/20.2.html validate({opt}) *vim.validate()* Validates a parameter specification (types and values). @@ -1085,13 +1094,4 @@ validate({opt}) *vim.validate()* • msg: (optional) error string if validation fails -is_callable({f}) *vim.is_callable()* - Returns true if object `f` can be called as a function. - - Parameters: ~ - {f} Any object - - Return: ~ - true if `f` is callable, else false - vim:tw=78:ts=8:ft=help:norl: |