mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
gen_vimdoc.py: sort by name
This commit is contained in:
2164
runtime/doc/api.txt
2164
runtime/doc/api.txt
File diff suppressed because it is too large
Load Diff
@@ -861,6 +861,9 @@ schedule_wrap({cb}) *vim.schedule_wrap()*
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
deep_equal({a}, {b}) *vim.deep_equal()*
|
||||||
|
TODO: Documentation
|
||||||
|
|
||||||
deepcopy({orig}) *vim.deepcopy()*
|
deepcopy({orig}) *vim.deepcopy()*
|
||||||
Returns a deep copy of the given object. Non-table objects are
|
Returns a deep copy of the given object. Non-table objects are
|
||||||
copied as in a typical Lua assignment, whereas table objects
|
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
|
https://www.lua.org/pil/20.2.html
|
||||||
http://lua-users.org/wiki/StringLibraryTutorial
|
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()*
|
split({s}, {sep}, {plain}) *vim.split()*
|
||||||
Splits a string at each instance of a separator.
|
Splits a string at each instance of a separator.
|
||||||
|
|
||||||
@@ -910,6 +952,62 @@ split({s}, {sep}, {plain}) *vim.split()*
|
|||||||
See also: ~
|
See also: ~
|
||||||
|vim.gsplit()|
|
|vim.gsplit()|
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
tbl_contains({t}, {value}) *vim.tbl_contains()*
|
||||||
|
Checks if a list-like (vector) table contains `value` .
|
||||||
|
|
||||||
|
Parameters: ~
|
||||||
|
{t} Table to check
|
||||||
|
{value} Value to compare
|
||||||
|
|
||||||
|
Return: ~
|
||||||
|
true if `t` contains `value`
|
||||||
|
|
||||||
|
tbl_extend({behavior}, {...}) *vim.tbl_extend()*
|
||||||
|
Merges two or more map-like tables.
|
||||||
|
|
||||||
|
Parameters: ~
|
||||||
|
{behavior} Decides what to do if a key is found in more
|
||||||
|
than one map:
|
||||||
|
• "error": raise an error
|
||||||
|
• "keep": use value from the leftmost map
|
||||||
|
• "force": use value from the rightmost map
|
||||||
|
{...} Two or more map-like tables.
|
||||||
|
|
||||||
|
See also: ~
|
||||||
|
|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.
|
||||||
|
|
||||||
|
Parameters: ~
|
||||||
|
{t} List-like table
|
||||||
|
|
||||||
|
Return: ~
|
||||||
|
Flattened copy of the given list-like table.
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
Return: ~
|
||||||
|
true: A non-empty array, false: A non-empty table, nil: An
|
||||||
|
empty table
|
||||||
|
|
||||||
tbl_keys({t}) *vim.tbl_keys()*
|
tbl_keys({t}) *vim.tbl_keys()*
|
||||||
Return a list of all keys used in a table. However, the order
|
Return a list of all keys used in a table. However, the order
|
||||||
of the return table of keys is not guaranteed.
|
of the return table of keys is not guaranteed.
|
||||||
@@ -933,83 +1031,6 @@ tbl_values({t}) *vim.tbl_values()*
|
|||||||
Return: ~
|
Return: ~
|
||||||
list of values
|
list of values
|
||||||
|
|
||||||
tbl_contains({t}, {value}) *vim.tbl_contains()*
|
|
||||||
Checks if a list-like (vector) table contains `value` .
|
|
||||||
|
|
||||||
Parameters: ~
|
|
||||||
{t} Table to check
|
|
||||||
{value} Value to compare
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Parameters: ~
|
|
||||||
{behavior} Decides what to do if a key is found in more
|
|
||||||
than one map:
|
|
||||||
• "error": raise an error
|
|
||||||
• "keep": use value from the leftmost map
|
|
||||||
• "force": use value from the rightmost map
|
|
||||||
{...} Two or more map-like tables.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Parameters: ~
|
|
||||||
{t} List-like table
|
|
||||||
|
|
||||||
Return: ~
|
|
||||||
Flattened copy of the given list-like table.
|
|
||||||
|
|
||||||
See also: ~
|
|
||||||
Fromhttps://github.com/premake/premake-core/blob/master/src/base/table.lua
|
|
||||||
|
|
||||||
tbl_islist({t}) *vim.tbl_islist()*
|
|
||||||
Table
|
|
||||||
|
|
||||||
Return: ~
|
|
||||||
true: A non-empty array, false: A non-empty table, nil: An
|
|
||||||
empty table
|
|
||||||
|
|
||||||
trim({s}) *vim.trim()*
|
trim({s}) *vim.trim()*
|
||||||
Trim whitespace (Lua pattern "%s") from both sides of a
|
Trim whitespace (Lua pattern "%s") from both sides of a
|
||||||
string.
|
string.
|
||||||
@@ -1023,18 +1044,6 @@ trim({s}) *vim.trim()*
|
|||||||
See also: ~
|
See also: ~
|
||||||
https://www.lua.org/pil/20.2.html
|
https://www.lua.org/pil/20.2.html
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
validate({opt}) *vim.validate()*
|
validate({opt}) *vim.validate()*
|
||||||
Validates a parameter specification (types and values).
|
Validates a parameter specification (types and values).
|
||||||
|
|
||||||
@@ -1085,13 +1094,4 @@ validate({opt}) *vim.validate()*
|
|||||||
• msg: (optional) error string if validation
|
• msg: (optional) error string if validation
|
||||||
fails
|
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:
|
vim:tw=78:ts=8:ft=help:norl:
|
||||||
|
@@ -145,7 +145,7 @@ def debug_this(cond, o):
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
if ((callable(cond) and cond())
|
if ((callable(cond) and cond())
|
||||||
or (not callable(cond) and cond == True)
|
or (not callable(cond) and cond)
|
||||||
or (not callable(cond) and cond in o)):
|
or (not callable(cond) and cond in o)):
|
||||||
raise RuntimeError('xxx: {}\n{}'.format(name, o))
|
raise RuntimeError('xxx: {}\n{}'.format(name, o))
|
||||||
|
|
||||||
@@ -312,8 +312,8 @@ def update_params_map(parent, ret_map, width=62):
|
|||||||
desc = ''
|
desc = ''
|
||||||
desc_node = get_child(node, 'parameterdescription')
|
desc_node = get_child(node, 'parameterdescription')
|
||||||
if desc_node:
|
if desc_node:
|
||||||
desc = fmt_node_as_vimhelp(desc_node, width=width,
|
desc = fmt_node_as_vimhelp(
|
||||||
indent=(' ' * max_name_len))
|
desc_node, width=width, indent=(' ' * max_name_len))
|
||||||
ret_map[name] = desc
|
ret_map[name] = desc
|
||||||
return ret_map
|
return ret_map
|
||||||
|
|
||||||
@@ -321,8 +321,10 @@ def update_params_map(parent, ret_map, width=62):
|
|||||||
def render_node(n, text, prefix='', indent='', width=62):
|
def render_node(n, text, prefix='', indent='', width=62):
|
||||||
"""Renders a node as Vim help text, recursively traversing all descendants."""
|
"""Renders a node as Vim help text, recursively traversing all descendants."""
|
||||||
global fmt_vimhelp
|
global fmt_vimhelp
|
||||||
|
|
||||||
def ind(s):
|
def ind(s):
|
||||||
return s if fmt_vimhelp else ''
|
return s if fmt_vimhelp else ''
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
# space_preceding = (len(text) > 0 and ' ' == text[-1][-1])
|
# space_preceding = (len(text) > 0 and ' ' == text[-1][-1])
|
||||||
# text += (int(not space_preceding) * ' ')
|
# text += (int(not space_preceding) * ' ')
|
||||||
@@ -666,6 +668,8 @@ def extract_from_xml(filename, mode, width):
|
|||||||
|
|
||||||
xrefs.clear()
|
xrefs.clear()
|
||||||
|
|
||||||
|
fns = collections.OrderedDict(sorted(fns.items()))
|
||||||
|
deprecated_fns = collections.OrderedDict(sorted(deprecated_fns.items()))
|
||||||
return (fns, deprecated_fns)
|
return (fns, deprecated_fns)
|
||||||
|
|
||||||
|
|
||||||
@@ -864,6 +868,7 @@ def main(config):
|
|||||||
with open(doc_file, 'ab') as fp:
|
with open(doc_file, 'ab') as fp:
|
||||||
fp.write(docs.encode('utf8'))
|
fp.write(docs.encode('utf8'))
|
||||||
|
|
||||||
|
fn_map_full = collections.OrderedDict(sorted(fn_map_full.items()))
|
||||||
with open(mpack_file, 'wb') as fp:
|
with open(mpack_file, 'wb') as fp:
|
||||||
fp.write(msgpack.packb(fn_map_full, use_bin_type=True))
|
fp.write(msgpack.packb(fn_map_full, use_bin_type=True))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user