aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/api.txt88
-rw-r--r--runtime/doc/lsp.txt40
-rw-r--r--runtime/doc/lua.txt54
-rwxr-xr-xscripts/gen_vimdoc.py23
4 files changed, 108 insertions, 97 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 0e1cf9ec3e..d16b9274dc 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -684,7 +684,7 @@ nvim_create_buf({listed}, {scratch}) *nvim_create_buf()*
Buffer handle, or 0 on error
See also: ~
- buf_open_scratch
+ • buf_open_scratch
nvim_del_current_line() *nvim_del_current_line()*
Deletes the current line.
@@ -698,7 +698,7 @@ nvim_del_keymap({mode}, {lhs}) *nvim_del_keymap()*
To unmap a buffer-local mapping, use |nvim_buf_del_keymap()|.
See also: ~
- |nvim_set_keymap()|
+ • |nvim_set_keymap()|
nvim_del_mark({name}) *nvim_del_mark()*
Deletes an uppercase/file named mark. See |mark-motions|.
@@ -713,8 +713,8 @@ nvim_del_mark({name}) *nvim_del_mark()*
true if the mark was deleted, else false.
See also: ~
- |nvim_buf_del_mark()|
- |nvim_get_mark()|
+ • |nvim_buf_del_mark()|
+ • |nvim_get_mark()|
nvim_del_var({name}) *nvim_del_var()*
Removes a global (g:) variable.
@@ -751,7 +751,7 @@ nvim_err_writeln({str}) *nvim_err_writeln()*
• {str} Message
See also: ~
- nvim_err_write()
+ • nvim_err_write()
nvim_eval_statusline({str}, {*opts}) *nvim_eval_statusline()*
Evaluates statusline string.
@@ -825,8 +825,8 @@ nvim_feedkeys({keys}, {mode}, {escape_ks}) *nvim_feedkeys()*
true otherwise.
See also: ~
- feedkeys()
- vim_strsave_escape_ks
+ • feedkeys()
+ • vim_strsave_escape_ks
nvim_get_api_info() *nvim_get_api_info()*
Returns a 2-tuple (Array), where item 0 is the current channel id and item
@@ -934,7 +934,7 @@ nvim_get_hl_by_id({hl_id}, {rgb}) *nvim_get_hl_by_id()*
Highlight definition map
See also: ~
- nvim_get_hl_by_name
+ • nvim_get_hl_by_name
nvim_get_hl_by_name({name}, {rgb}) *nvim_get_hl_by_name()*
Gets a highlight definition by name.
@@ -947,7 +947,7 @@ nvim_get_hl_by_name({name}, {rgb}) *nvim_get_hl_by_name()*
Highlight definition map
See also: ~
- nvim_get_hl_by_id
+ • nvim_get_hl_by_id
nvim_get_hl_id_by_name({name}) *nvim_get_hl_id_by_name()*
Gets a highlight group by name
@@ -982,8 +982,8 @@ nvim_get_mark({name}, {opts}) *nvim_get_mark()*
not set.
See also: ~
- |nvim_buf_set_mark()|
- |nvim_del_mark()|
+ • |nvim_buf_set_mark()|
+ • |nvim_del_mark()|
nvim_get_mode() *nvim_get_mode()*
Gets the current mode. |mode()| "blocking" is true if Nvim is waiting for
@@ -1257,8 +1257,8 @@ nvim_replace_termcodes({str}, {from_part}, {do_lt}, {special})
• {special} Replace |keycodes|, e.g. <CR> becomes a "\r" char.
See also: ~
- replace_termcodes
- cpoptions
+ • replace_termcodes
+ • cpoptions
*nvim_select_popupmenu_item()*
nvim_select_popupmenu_item({item}, {insert}, {finish}, {opts})
@@ -1592,9 +1592,9 @@ nvim_exec({src}, {output}) *nvim_exec()*
string.
See also: ~
- |execute()|
- |nvim_command()|
- |nvim_cmd()|
+ • |execute()|
+ • |nvim_command()|
+ • |nvim_cmd()|
*nvim_parse_expression()*
nvim_parse_expression({expr}, {flags}, {highlight})
@@ -1688,7 +1688,7 @@ nvim_buf_create_user_command({buffer}, {name}, {command}, {*opts})
• {buffer} Buffer handle, or 0 for current buffer.
See also: ~
- nvim_create_user_command
+ • nvim_create_user_command
*nvim_buf_del_user_command()*
nvim_buf_del_user_command({buffer}, {name})
@@ -1742,8 +1742,8 @@ nvim_cmd({*cmd}, {*opts}) *nvim_cmd()*
empty string.
See also: ~
- |nvim_exec()|
- |nvim_command()|
+ • |nvim_exec()|
+ • |nvim_command()|
*nvim_create_user_command()*
nvim_create_user_command({name}, {command}, {*opts})
@@ -2101,8 +2101,8 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()*
otherwise True. TODO: LUA_API_NO_EVAL
See also: ~
- |nvim_buf_detach()|
- |api-buffer-updates-lua|
+ • |nvim_buf_detach()|
+ • |api-buffer-updates-lua|
nvim_buf_call({buffer}, {fun}) *nvim_buf_call()*
call a function with buffer as temporary current buffer
@@ -2136,7 +2136,7 @@ nvim_buf_del_keymap({buffer}, {mode}, {lhs}) *nvim_buf_del_keymap()*
• {buffer} Buffer handle, or 0 for current buffer
See also: ~
- |nvim_del_keymap()|
+ • |nvim_del_keymap()|
nvim_buf_del_mark({buffer}, {name}) *nvim_buf_del_mark()*
Deletes a named mark in the buffer. See |mark-motions|.
@@ -2153,8 +2153,8 @@ nvim_buf_del_mark({buffer}, {name}) *nvim_buf_del_mark()*
true if the mark was deleted, else false.
See also: ~
- |nvim_buf_set_mark()|
- |nvim_del_mark()|
+ • |nvim_buf_set_mark()|
+ • |nvim_del_mark()|
nvim_buf_del_var({buffer}, {name}) *nvim_buf_del_var()*
Removes a buffer-scoped (b:) variable
@@ -2189,8 +2189,8 @@ nvim_buf_detach({buffer}) *nvim_buf_detach()*
True.
See also: ~
- |nvim_buf_attach()|
- |api-lua-detach| for detaching Lua callbacks
+ • |nvim_buf_attach()|
+ • |api-lua-detach| for detaching Lua callbacks
nvim_buf_get_changedtick({buffer}) *nvim_buf_get_changedtick()*
Gets a changed tick of a buffer
@@ -2247,8 +2247,8 @@ nvim_buf_get_mark({buffer}, {name}) *nvim_buf_get_mark()*
uppercase/file mark set in another buffer.
See also: ~
- |nvim_buf_set_mark()|
- |nvim_buf_del_mark()|
+ • |nvim_buf_set_mark()|
+ • |nvim_buf_del_mark()|
nvim_buf_get_name({buffer}) *nvim_buf_get_name()*
Gets the full file name for the buffer
@@ -2351,7 +2351,7 @@ nvim_buf_set_keymap({buffer}, {mode}, {lhs}, {rhs}, {*opts})
• {buffer} Buffer handle, or 0 for current buffer
See also: ~
- |nvim_set_keymap()|
+ • |nvim_set_keymap()|
*nvim_buf_set_lines()*
nvim_buf_set_lines({buffer}, {start}, {end}, {strict_indexing}, {replacement})
@@ -2378,7 +2378,7 @@ nvim_buf_set_lines({buffer}, {start}, {end}, {strict_indexing}, {replacement})
• {replacement} Array of lines to use as replacement
See also: ~
- |nvim_buf_set_text()|
+ • |nvim_buf_set_text()|
*nvim_buf_set_mark()*
nvim_buf_set_mark({buffer}, {name}, {line}, {col}, {opts})
@@ -2401,8 +2401,8 @@ nvim_buf_set_mark({buffer}, {name}, {line}, {col}, {opts})
true if the mark was set, else false.
See also: ~
- |nvim_buf_del_mark()|
- |nvim_buf_get_mark()|
+ • |nvim_buf_del_mark()|
+ • |nvim_buf_get_mark()|
nvim_buf_set_name({buffer}, {name}) *nvim_buf_set_name()*
Sets the full file name for a buffer
@@ -2439,7 +2439,7 @@ nvim_buf_set_text({buffer}, {start_row}, {start_col}, {end_row}, {end_col},
• {replacement} Array of lines to use as replacement
See also: ~
- |nvim_buf_set_lines()|
+ • |nvim_buf_set_lines()|
nvim_buf_set_var({buffer}, {name}, {value}) *nvim_buf_set_var()*
Sets a buffer-scoped (b:) variable
@@ -2775,8 +2775,8 @@ nvim_win_call({window}, {fun}) *nvim_win_call()*
upvalues to send lua references in and out.
See also: ~
- |win_execute()|
- |nvim_buf_call()|
+ • |win_execute()|
+ • |nvim_buf_call()|
nvim_win_close({window}, {force}) *nvim_win_close()*
Closes the window (like |:close| with a |window-ID|).
@@ -3114,7 +3114,7 @@ nvim_win_set_config({window}, {*config}) *nvim_win_set_config()*
• {config} Map defining the window configuration, see |nvim_open_win()|
See also: ~
- |nvim_open_win()|
+ • |nvim_open_win()|
==============================================================================
@@ -3232,7 +3232,7 @@ nvim_create_augroup({name}, {*opts}) *nvim_create_augroup()*
Integer id of the created group.
See also: ~
- |autocmd-groups|
+ • |autocmd-groups|
nvim_create_autocmd({event}, {*opts}) *nvim_create_autocmd()*
Creates an |autocommand| event handler, defined by `callback` (Lua function or Vimscript function name string) or `command` (Ex command string).
@@ -3297,8 +3297,8 @@ nvim_create_autocmd({event}, {*opts}) *nvim_create_autocmd()*
Autocommand id (number)
See also: ~
- |autocommand|
- |nvim_del_autocmd()|
+ • |autocommand|
+ • |nvim_del_autocmd()|
nvim_del_augroup_by_id({id}) *nvim_del_augroup_by_id()*
Delete an autocommand group by id.
@@ -3313,8 +3313,8 @@ nvim_del_augroup_by_id({id}) *nvim_del_augroup_by_id()*
• {id} Integer The id of the group.
See also: ~
- |nvim_del_augroup_by_name()|
- |nvim_create_augroup()|
+ • |nvim_del_augroup_by_name()|
+ • |nvim_create_augroup()|
nvim_del_augroup_by_name({name}) *nvim_del_augroup_by_name()*
Delete an autocommand group by name.
@@ -3327,7 +3327,7 @@ nvim_del_augroup_by_name({name}) *nvim_del_augroup_by_name()*
• {name} String The name of the group.
See also: ~
- |autocmd-groups|
+ • |autocmd-groups|
nvim_del_autocmd({id}) *nvim_del_autocmd()*
Delete an autocommand by id.
@@ -3338,7 +3338,7 @@ nvim_del_autocmd({id}) *nvim_del_autocmd()*
• {id} Integer The id returned by nvim_create_autocmd
See also: ~
- |nvim_create_autocmd()|
+ • |nvim_create_autocmd()|
nvim_exec_autocmds({event}, {*opts}) *nvim_exec_autocmds()*
Execute all autocommands for {event} that match the corresponding {opts}
@@ -3359,7 +3359,7 @@ nvim_exec_autocmds({event}, {*opts}) *nvim_exec_autocmds()*
callback. See |nvim_create_autocmd()| for details.
See also: ~
- |:doautocmd|
+ • |:doautocmd|
nvim_get_autocmds({*opts}) *nvim_get_autocmds()*
Get all autocommands that match the corresponding {opts}.
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 25293eb9b2..0164b34efb 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -862,9 +862,9 @@ omnifunc({findstart}, {base}) *vim.lsp.omnifunc()*
• findstart=1: list of matches (actually just calls |complete()|)
See also: ~
- |complete-functions|
- |complete-items|
- |CompleteDone|
+ • |complete-functions|
+ • |complete-items|
+ • |CompleteDone|
set_log_level({level}) *vim.lsp.set_log_level()*
Sets the global log level for LSP logging.
@@ -879,7 +879,7 @@ set_log_level({level}) *vim.lsp.set_log_level()*
• {level} (integer|string) the case insensitive level name or number
See also: ~
- |vim.lsp.log_levels|
+ • |vim.lsp.log_levels|
start({config}, {opts}) *vim.lsp.start()*
Create a new LSP client and start a language server or reuses an already
@@ -1132,8 +1132,8 @@ code_action({options}) *vim.lsp.buf.code_action()*
|api-indexing|
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeAction
- vim.lsp.protocol.constants.CodeActionTriggerKind
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeAction
+ • vim.lsp.protocol.constants.CodeActionTriggerKind
completion({context}) *vim.lsp.buf.completion()*
Retrieves the completion items at the current cursor position. Can only be
@@ -1146,7 +1146,7 @@ completion({context}) *vim.lsp.buf.completion()*
character, if applicable)
See also: ~
- vim.lsp.protocol.constants.CompletionTriggerKind
+ • vim.lsp.protocol.constants.CompletionTriggerKind
declaration({options}) *vim.lsp.buf.declaration()*
Jumps to the declaration of the symbol under the cursor.
@@ -1200,7 +1200,7 @@ execute_command({command_params}) *vim.lsp.buf.execute_command()*
• {command_params} (table) A valid `ExecuteCommandParams` object
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_executeCommand
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_executeCommand
format({options}) *vim.lsp.buf.format()*
Formats a buffer using the attached (and optionally filtered) language
@@ -1278,7 +1278,7 @@ references({context}, {options}) *vim.lsp.buf.references()*
|lsp-on-list-handler|
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references
*vim.lsp.buf.remove_workspace_folder()*
remove_workspace_folder({workspace_folder})
@@ -1570,7 +1570,7 @@ apply_text_document_edit({text_document_edit}, {index}, {offset_encoding})
list of edits (or nil, if not from a list)
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentEdit
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentEdit
*vim.lsp.util.apply_text_edits()*
apply_text_edits({text_edits}, {bufnr}, {offset_encoding})
@@ -1582,7 +1582,7 @@ apply_text_edits({text_edits}, {bufnr}, {offset_encoding})
• {offset_encoding} (string) utf-8|utf-16|utf-32
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textEdit
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textEdit
*vim.lsp.util.apply_workspace_edit()*
apply_workspace_edit({workspace_edit}, {offset_encoding})
@@ -1609,7 +1609,7 @@ buf_highlight_references({bufnr}, {references}, {offset_encoding})
• {offset_encoding} (string) One of "utf-8", "utf-16", "utf-32".
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent
+ • https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent
*vim.lsp.util.character_offset()*
character_offset({buf}, {row}, {col}, {offset_encoding})
@@ -1642,7 +1642,7 @@ convert_input_to_markdown_lines({input}, {contents})
{contents}, extended with lines of converted markdown.
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_hover
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_hover
*vim.lsp.util.convert_signature_help_to_markdown_lines()*
convert_signature_help_to_markdown_lines({signature_help}, {ft}, {triggers})
@@ -1659,7 +1659,7 @@ convert_signature_help_to_markdown_lines({signature_help}, {ft}, {triggers})
(list) of lines of converted markdown.
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_signatureHelp
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_signatureHelp
*vim.lsp.util.extract_completion_items()*
extract_completion_items({result})
@@ -1672,7 +1672,7 @@ extract_completion_items({result})
(table) List of completion items
See also: ~
- https://microsoft.github.io/language-server-protocol/specification#textDocument_completion
+ • https://microsoft.github.io/language-server-protocol/specification#textDocument_completion
get_effective_tabstop({bufnr}) *vim.lsp.util.get_effective_tabstop()*
Returns indentation size.
@@ -1684,7 +1684,7 @@ get_effective_tabstop({bufnr}) *vim.lsp.util.get_effective_tabstop()*
(integer) indentation size
See also: ~
- 'shiftwidth'
+ • 'shiftwidth'
*vim.lsp.util.jump_to_location()*
jump_to_location({location}, {offset_encoding}, {reuse_win})
@@ -1756,7 +1756,7 @@ make_formatting_params({options})
`DocumentFormattingParams` object
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_formatting
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_formatting
*vim.lsp.util.make_given_range_params()*
make_given_range_params({start_pos}, {end_pos}, {bufnr}, {offset_encoding})
@@ -1793,7 +1793,7 @@ make_position_params({window}, {offset_encoding})
`TextDocumentPositionParams` object
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams
*vim.lsp.util.make_range_params()*
make_range_params({window}, {offset_encoding})
@@ -1824,7 +1824,7 @@ make_text_document_params({bufnr})
`TextDocumentIdentifier`
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentIdentifier
+ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentIdentifier
*vim.lsp.util.make_workspace_params()*
make_workspace_params({added}, {removed})
@@ -1974,7 +1974,7 @@ text_document_completion_list_to_complete_items({result}, {prefix})
{ matches = complete-items table, incomplete = bool }
See also: ~
- |complete-items|
+ • |complete-items|
trim_empty_lines({lines}) *vim.lsp.util.trim_empty_lines()*
Removes empty lines from the beginning and end.
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 81e45ae9bb..68f63f4fb8 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1364,7 +1364,7 @@ cmd({command}) *vim.cmd()*
|nvim_cmd()| where `opts` is empty.
See also: ~
- |ex-cmd-index|
+ • |ex-cmd-index|
*vim.connection_failure_errmsg()*
connection_failure_errmsg({consequence})
@@ -1401,8 +1401,8 @@ inspect({object}, {options}) *vim.inspect()*
Gets a human-readable representation of the given object.
See also: ~
- https://github.com/kikito/inspect.lua
- https://github.com/mpeterv/vinspect
+ • https://github.com/kikito/inspect.lua
+ • https://github.com/mpeterv/vinspect
lua_omnifunc({find_start}, {_}) *vim.lua_omnifunc()*
Omnifunc for completing lua values from from the runtime lua interpreter,
@@ -1494,7 +1494,7 @@ paste({lines}, {phase}) *vim.paste()*
(boolean) # false if client should cancel the paste.
See also: ~
- |paste| @alias paste_phase -1 | 1 | 2 | 3
+ • |paste| @alias paste_phase -1 | 1 | 2 | 3
print({...}) *vim.print()*
"Pretty prints" the given arguments and returns them unmodified.
@@ -1507,7 +1507,7 @@ print({...}) *vim.print()*
any # given arguments.
See also: ~
- |vim.inspect()|
+ • |vim.inspect()|
region({bufnr}, {pos1}, {pos2}, {regtype}, {inclusive}) *vim.region()*
Get a table of lines with start, end columns for a region marked by two
@@ -1535,9 +1535,9 @@ schedule_wrap({cb}) *vim.schedule_wrap()*
(function)
See also: ~
- |lua-loop-callbacks|
- |vim.schedule()|
- |vim.in_fast_event()|
+ • |lua-loop-callbacks|
+ • |vim.schedule()|
+ • |vim.in_fast_event()|
==============================================================================
@@ -1663,10 +1663,10 @@ gsplit({s}, {sep}, {plain}) *vim.gsplit()*
(function) Iterator over the split components
See also: ~
- |vim.split()|
- |luaref-patterns|
- https://www.lua.org/pil/20.2.html
- http://lua-users.org/wiki/StringLibraryTutorial
+ • |vim.split()|
+ • |luaref-patterns|
+ • 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.
@@ -1692,7 +1692,7 @@ list_extend({dst}, {src}, {start}, {finish}) *vim.list_extend()*
(table) dst
See also: ~
- |vim.tbl_extend()|
+ • |vim.tbl_extend()|
list_slice({list}, {start}, {finish}) *vim.list_slice()*
Creates a copy of a table containing only elements from start to end
@@ -1716,7 +1716,7 @@ pesc({s}) *vim.pesc()*
(string) %-escaped pattern string
See also: ~
- https://github.com/rxi/lume
+ • https://github.com/rxi/lume
spairs({t}) *vim.spairs()*
Enumerate a table sorted by its keys.
@@ -1728,7 +1728,7 @@ spairs({t}) *vim.spairs()*
iterator over sorted keys and their values
See also: ~
- Based on https://github.com/premake/premake-core/blob/master/src/base/table.lua
+ • Based on https://github.com/premake/premake-core/blob/master/src/base/table.lua
split({s}, {sep}, {kwargs}) *vim.split()*
Splits a string at each instance of a separator.
@@ -1754,7 +1754,7 @@ split({s}, {sep}, {kwargs}) *vim.split()*
string[] List of split components
See also: ~
- |vim.gsplit()|
+ • |vim.gsplit()|
startswith({s}, {prefix}) *vim.startswith()*
Tests if `s` starts with `prefix`.
@@ -1804,7 +1804,7 @@ tbl_count({t}) *vim.tbl_count()*
(integer) Number of non-nil values in table
See also: ~
- https://github.com/Tieske/Penlight/blob/master/lua/pl/tablex.lua
+ • https://github.com/Tieske/Penlight/blob/master/lua/pl/tablex.lua
tbl_deep_extend({behavior}, {...}) *vim.tbl_deep_extend()*
Merges recursively two or more map-like tables.
@@ -1821,7 +1821,7 @@ tbl_deep_extend({behavior}, {...}) *vim.tbl_deep_extend()*
(table) Merged table
See also: ~
- |vim.tbl_extend()|
+ • |vim.tbl_extend()|
tbl_extend({behavior}, {...}) *vim.tbl_extend()*
Merges two or more map-like tables.
@@ -1838,7 +1838,7 @@ tbl_extend({behavior}, {...}) *vim.tbl_extend()*
(table) Merged table
See also: ~
- |extend()|
+ • |extend()|
tbl_filter({func}, {t}) *vim.tbl_filter()*
Filter a table using a predicate function
@@ -1861,7 +1861,7 @@ tbl_flatten({t}) *vim.tbl_flatten()*
(table) Flattened copy of the given list-like table
See also: ~
- From https://github.com/premake/premake-core/blob/master/src/base/table.lua
+ • From https://github.com/premake/premake-core/blob/master/src/base/table.lua
tbl_get({o}, {...}) *vim.tbl_get()*
Index into a table (first argument) via string keys passed as subsequent
@@ -1891,7 +1891,7 @@ tbl_isempty({t}) *vim.tbl_isempty()*
(boolean) `true` if `t` is empty
See also: ~
- https://github.com/premake/premake-core/blob/master/src/base/table.lua
+ • https://github.com/premake/premake-core/blob/master/src/base/table.lua
tbl_islist({t}) *vim.tbl_islist()*
Tests if a Lua table can be treated as an array.
@@ -1917,7 +1917,7 @@ tbl_keys({t}) *vim.tbl_keys()*
(list) List of keys
See also: ~
- From https://github.com/premake/premake-core/blob/master/src/base/table.lua
+ • From https://github.com/premake/premake-core/blob/master/src/base/table.lua
tbl_map({func}, {t}) *vim.tbl_map()*
Apply a function to all values of a table.
@@ -1949,8 +1949,8 @@ trim({s}) *vim.trim()*
(string) String with whitespace removed from its beginning and end
See also: ~
- |luaref-patterns|
- https://www.lua.org/pil/20.2.html
+ • |luaref-patterns|
+ • https://www.lua.org/pil/20.2.html
validate({opt}) *vim.validate()*
Validates a parameter specification (types and values).
@@ -2275,7 +2275,7 @@ del({modes}, {lhs}, {opts}) *vim.keymap.del()*
buffer. When "true" or 0, use the current buffer.
See also: ~
- |vim.keymap.set()|
+ • |vim.keymap.set()|
set({mode}, {lhs}, {rhs}, {opts}) *vim.keymap.set()*
Adds a new |mapping|. Examples: >lua
@@ -2312,7 +2312,7 @@ set({mode}, {lhs}, {rhs}, {opts}) *vim.keymap.set()*
"noremap". Defaults to `false`.
See also: ~
- |nvim_set_keymap()|
+ • |nvim_set_keymap()|
==============================================================================
@@ -2481,7 +2481,7 @@ read({path}) *vim.secure.read()*
trusted, or nil otherwise.
See also: ~
- |:trust|
+ • |:trust|
trust({opts}) *vim.secure.trust()*
Manage the trust database.
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py
index 1e85fa49e9..72f9df325b 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -537,7 +537,7 @@ def render_node(n, text, prefix='', indent='', width=text_width - indentation,
text += '>{}{}\n<'.format(ensure_nl, o)
elif is_inline(n):
- text = doc_wrap(get_text(n), indent=indent, width=width)
+ text = doc_wrap(get_text(n), prefix=prefix, indent=indent, width=width)
elif n.nodeName == 'verbatim':
# TODO: currently we don't use this. The "[verbatim]" hint is there as
# a reminder that we must decide how to format this if we do use it.
@@ -550,19 +550,19 @@ def render_node(n, text, prefix='', indent='', width=text_width - indentation,
indent=indent + (' ' * len(prefix)),
width=width
)
-
if is_blank(result):
continue
-
text += indent + prefix + result
elif n.nodeName in ('para', 'heading'):
+ did_prefix = False
for c in n.childNodes:
if (is_inline(c)
and '' != get_text(c).strip()
and text
and ' ' != text[-1]):
text += ' '
- text += render_node(c, text, indent=indent, width=width)
+ text += render_node(c, text, prefix=(prefix if not did_prefix else ''), indent=indent, width=width)
+ did_prefix = True
elif n.nodeName == 'itemizedlist':
for c in n.childNodes:
text += '{}\n'.format(render_node(c, text, prefix='• ',
@@ -586,8 +586,15 @@ def render_node(n, text, prefix='', indent='', width=text_width - indentation,
for c in n.childNodes:
text += render_node(c, text, indent=' ', width=width)
text += '\n'
- elif (n.nodeName == 'simplesect'
- and n.getAttribute('kind') in ('return', 'see')):
+ elif n.nodeName == 'simplesect' and 'see' == n.getAttribute('kind'):
+ text += ind(' ')
+ # Example:
+ # <simplesect kind="see">
+ # <para>|autocommand|</para>
+ # </simplesect>
+ for c in n.childNodes:
+ text += render_node(c, text, prefix='• ', indent=' ', width=width)
+ elif n.nodeName == 'simplesect' and 'return' == n.getAttribute('kind'):
text += ind(' ')
for c in n.childNodes:
text += render_node(c, text, indent=' ', width=width)
@@ -678,6 +685,10 @@ def para_as_map(parent, indent='', width=text_width - indentation, fmt_vimhelp=F
chunks['return'].append(render_node(
child, '', indent=indent, width=width, fmt_vimhelp=fmt_vimhelp))
for child in groups['seealso']:
+ # Example:
+ # <simplesect kind="see">
+ # <para>|autocommand|</para>
+ # </simplesect>
chunks['seealso'].append(render_node(
child, '', indent=indent, width=width, fmt_vimhelp=fmt_vimhelp))