aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/api.txt65
-rw-r--r--runtime/doc/lsp.txt71
-rw-r--r--runtime/doc/lua.txt13
3 files changed, 69 insertions, 80 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 0d896f33f4..b80ca9edd7 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -537,6 +537,12 @@ nvim__put_attr({id}, {start_row}, {start_col}, {end_row}, {end_col})
should probably be derived from a reformed bufhl/virttext
interface with full support for multi-line ranges etc
+nvim__screenshot({path}) *nvim__screenshot()*
+ TODO: Documentation
+
+ Attributes: ~
+ {fast}
+
nvim__stats() *nvim__stats()*
Gets internal stats.
@@ -1565,12 +1571,6 @@ affected.
You can use |nvim_buf_is_loaded()| or |nvim_buf_line_count()|
to check whether a buffer is loaded.
- *nvim__buf_add_decoration()*
-nvim__buf_add_decoration({buffer}, {ns_id}, {hl_group}, {start_row},
- {start_col}, {end_row}, {end_col},
- {virt_text})
- TODO: Documentation
-
*nvim__buf_redraw_range()*
nvim__buf_redraw_range({buffer}, {first}, {last})
TODO: Documentation
@@ -1767,13 +1767,16 @@ nvim_buf_get_commands({buffer}, {opts}) *nvim_buf_get_commands()*
Map of maps describing commands.
*nvim_buf_get_extmark_by_id()*
-nvim_buf_get_extmark_by_id({buffer}, {ns_id}, {id})
+nvim_buf_get_extmark_by_id({buffer}, {ns_id}, {id}, {opts})
Returns position for a given extmark id
Parameters: ~
{buffer} Buffer handle, or 0 for current buffer
{ns_id} Namespace id from |nvim_create_namespace()|
{id} Extmark id
+ {opts} Optional parameters. Keys:
+ • limit: Maximum number of marks to return
+ • details Whether to include the details dict
Return: ~
(row, col) tuple or empty list () if extmark id was absent
@@ -1822,6 +1825,7 @@ nvim_buf_get_extmarks({buffer}, {ns_id}, {start}, {end}, {opts})
extmark id (whose position defines the bound)
{opts} Optional parameters. Keys:
• limit: Maximum number of marks to return
+ • details Whether to include the details dict
Return: ~
List of [extmark_id, row, col] tuples in "traversal
@@ -1920,28 +1924,6 @@ nvim_buf_get_var({buffer}, {name}) *nvim_buf_get_var()*
Return: ~
Variable value
- *nvim_buf_get_virtual_text()*
-nvim_buf_get_virtual_text({buffer}, {line})
- Get the virtual text (annotation) for a buffer line.
-
- The virtual text is returned as list of lists, whereas the
- inner lists have either one or two elements. The first element
- is the actual text, the optional second element is the
- highlight group.
-
- The format is exactly the same as given to
- nvim_buf_set_virtual_text().
-
- If there is no virtual text associated with the given line, an
- empty list is returned.
-
- Parameters: ~
- {buffer} Buffer handle, or 0 for current buffer
- {line} Line to get the virtual text from (zero-indexed)
-
- Return: ~
- List of virtual text chunks
-
nvim_buf_is_loaded({buffer}) *nvim_buf_is_loaded()*
Checks if a buffer is valid and loaded. See |api-buffer| for
more info about unloaded buffers.
@@ -1975,22 +1957,35 @@ nvim_buf_line_count({buffer}) *nvim_buf_line_count()*
Line count, or 0 for unloaded buffer. |api-buffer|
*nvim_buf_set_extmark()*
-nvim_buf_set_extmark({buffer}, {ns_id}, {id}, {line}, {col}, {opts})
+nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {opts})
Creates or updates an extmark.
To create a new extmark, pass id=0. The extmark id will be
- returned. It is also allowed to create a new mark by passing
- in a previously unused id, but the caller must then keep track
- of existing and unused ids itself. (Useful over RPC, to avoid
+ returned. To move an existing mark, pass its id.
+
+ It is also allowed to create a new mark by passing in a
+ previously unused id, but the caller must then keep track of
+ existing and unused ids itself. (Useful over RPC, to avoid
waiting for the return value.)
+ Using the optional arguments, it is possible to use this to
+ highlight a range of text, and also to associate virtual text
+ to the mark.
+
Parameters: ~
{buffer} Buffer handle, or 0 for current buffer
{ns_id} Namespace id from |nvim_create_namespace()|
- {id} Extmark id, or 0 to create new
{line} Line number where to place the mark
{col} Column where to place the mark
- {opts} Optional parameters. Currently not used.
+ {opts} Optional parameters.
+ • id : id of the extmark to edit.
+ • end_line : ending line of the mark, 0-based
+ inclusive.
+ • end_col : ending col of the mark, 0-based
+ inclusive.
+ • hl_group : name of the highlight group used to
+ highlight this mark.
+ • virt_text : virtual text to link to this mark.
Return: ~
Id of the created/updated extmark
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 98a7927ea4..0300ba55b3 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -419,7 +419,7 @@ client() *vim.lsp.client*
|vim.lsp.get_active_clients()|.
• Methods:
- • request(method, params, [callback], bufnr) Send a request
+ • request(method, params, [callback], bufnr) Sends a request
to the server. This is a thin wrapper around
{client.rpc.request} with some additional checking. If
{callback} is not specified, it will use
@@ -431,13 +431,13 @@ client() *vim.lsp.client*
If {status} is `true` , the function returns {request_id}
as the second result. You can use this with
`client.cancel_request(request_id)` to cancel the request.
- • notify(method, params) Send a notification to an LSP
+ • notify(method, params) Sends a notification to an LSP
server. Returns: a boolean to indicate if the notification
was successful. If it is false, then it will always be
false (the client has shutdown).
• cancel_request(id) Cancels a request with a given request
id. Returns: same as `notify()` .
- • stop([force]) Stop a client, optionally with force. By
+ • stop([force]) Stops a client, optionally with force. By
default, it will just ask the server to shutdown without
force. If you request to stop a client which has
previously been requested to shutdown, it will
@@ -688,7 +688,7 @@ clear_references() *vim.lsp.buf.clear_references()*
Removes document highlights from current buffer.
code_action({context}) *vim.lsp.buf.code_action()*
- Select a code action from the input list that is available at
+ Selects a code action from the input list that is available at
the current cursor position.
Parameters: ~
@@ -733,7 +733,7 @@ document_symbol() *vim.lsp.buf.document_symbol()*
window.
execute_command({command}) *vim.lsp.buf.execute_command()*
- Execute an LSP server command.
+ Executes an LSP server command.
Parameters: ~
{command} A valid `ExecuteCommandParams` object
@@ -755,7 +755,7 @@ formatting({options}) *vim.lsp.buf.formatting()*
*vim.lsp.buf.formatting_sync()*
formatting_sync({options}, {timeout_ms})
- Perform |vim.lsp.buf.formatting()| synchronously.
+ Performs |vim.lsp.buf.formatting()| synchronously.
Useful for running on save, to make sure buffer is formatted
prior to being saved. {timeout_ms} is passed on to
@@ -790,15 +790,13 @@ outgoing_calls() *vim.lsp.buf.outgoing_calls()*
*vim.lsp.buf.range_formatting()*
range_formatting({options}, {start_pos}, {end_pos})
- Perform |vim.lsp.buf.formatting()| synchronously.
-
- Useful for running on save, to make sure buffer is formatted
- prior to being saved. {timeout_ms} is passed on to
- |vim.lsp.buf_request_sync()|.
+ Formats a given range.
Parameters: ~
- {options} Table with valid `FormattingOptions` entries
- {timeout_ms} (number) Request timeout
+ {options} Table with valid `FormattingOptions` entries.
+ {start_pos} ({number, number}, optional) mark-indexed
+ position. Defaults to the end of the last
+ visual selection.
references({context}) *vim.lsp.buf.references()*
Lists all the references to the symbol under the cursor in the
@@ -918,7 +916,7 @@ rpc_response_error({code}, {message}, {data})
*vim.lsp.rpc.start()*
start({cmd}, {cmd_args}, {handlers}, {extra_spawn_params})
- Start an LSP server process and create an LSP RPC client
+ Starts an LSP server process and create an LSP RPC client
object to interact with it.
Parameters: ~
@@ -959,9 +957,6 @@ Lua module: vim.lsp.util *lsp-util*
*vim.lsp.util.apply_text_document_edit()*
apply_text_document_edit({text_document_edit})
- Apply a `TextDocumentEdit` , which is a list of changes to a
- single document.
-
Parameters: ~
{text_document_edit} (table) a `TextDocumentEdit` object
@@ -984,7 +979,7 @@ apply_workspace_edit({workspace_edit})
{workspace_edit} (table) `WorkspaceEdit`
buf_clear_diagnostics({bufnr}) *vim.lsp.util.buf_clear_diagnostics()*
- Clear diagnostics for a buffer.
+ Clears diagnostics for a buffer.
Parameters: ~
{bufnr} (number) buffer id
@@ -1037,7 +1032,7 @@ buf_diagnostics_save_positions({bufnr}, {diagnostics})
*vim.lsp.util.buf_diagnostics_signs()*
buf_diagnostics_signs({bufnr}, {diagnostics})
- Place signs for each diagnostic in the sign column.
+ Places signs for each diagnostic in the sign column.
Sign characters can be customized with the following commands:
>
@@ -1058,7 +1053,7 @@ buf_diagnostics_underline({bufnr}, {diagnostics})
*vim.lsp.util.buf_diagnostics_virtual_text()*
buf_diagnostics_virtual_text({bufnr}, {diagnostics})
- Given a list of diagnostics, set the corresponding virtual
+ Given a list of diagnostics, sets the corresponding virtual
text for a buffer.
Parameters: ~
@@ -1067,7 +1062,7 @@ buf_diagnostics_virtual_text({bufnr}, {diagnostics})
*vim.lsp.util.buf_highlight_references()*
buf_highlight_references({bufnr}, {references})
- Show a list of document highlights for a certain buffer.
+ Shows a list of document highlights for a certain buffer.
Parameters: ~
{bufnr} buffer id
@@ -1089,7 +1084,7 @@ character_offset({buf}, {row}, {col}) *vim.lsp.util.character_offset()*
*vim.lsp.util.close_preview_autocmd()*
close_preview_autocmd({events}, {winnr})
- Create autocommands to close a preview window when events
+ Creates autocommands to close a preview window when events
happen.
Parameters: ~
@@ -1101,7 +1096,7 @@ close_preview_autocmd({events}, {winnr})
*vim.lsp.util.convert_input_to_markdown_lines()*
convert_input_to_markdown_lines({input}, {contents})
- Convert any of `MarkedString` | `MarkedString[]` |
+ Converts any of `MarkedString` | `MarkedString[]` |
`MarkupContent` into a list of lines containing valid
markdown. Useful to populate the hover window for
`textDocument/hover` , for parsing the result of
@@ -1121,7 +1116,7 @@ convert_input_to_markdown_lines({input}, {contents})
*vim.lsp.util.convert_signature_help_to_markdown_lines()*
convert_signature_help_to_markdown_lines({signature_help})
- Convert `textDocument/SignatureHelp` response to markdown
+ Converts `textDocument/SignatureHelp` response to markdown
lines.
Parameters: ~
@@ -1163,11 +1158,11 @@ extract_completion_items({result})
*vim.lsp.util.fancy_floating_markdown()*
fancy_floating_markdown({contents}, {opts})
- Convert markdown into syntax highlighted regions by stripping
+ Converts markdown into syntax highlighted regions by stripping
the code blocks and converting them into highlighted code.
This will by default insert a blank line separator after those
code block regions to improve readability. The result is shown
- in a floating preview
+ in a floating preview.
Parameters: ~
{contents} table of lines to show in window
@@ -1193,9 +1188,9 @@ focusable_float({unique_name}, {fn}) *vim.lsp.util.focusable_float()*
*vim.lsp.util.focusable_preview()*
focusable_preview({unique_name}, {fn})
- Focus/unfocus the floating preview window associated with the
- current buffer via the window variable `unique_name` . If no
- such preview window exists, make a new one.
+ Focuses/unfocuses the floating preview window associated with
+ the current buffer via the window variable `unique_name` . If
+ no such preview window exists, makes a new one.
Parameters: ~
{unique_name} (string) Window variable
@@ -1206,7 +1201,7 @@ focusable_preview({unique_name}, {fn})
be created
get_effective_tabstop({bufnr}) *vim.lsp.util.get_effective_tabstop()*
- Get visual width of tabstop.
+ Returns visual width of tabstop.
Parameters: ~
{bufnr} (optional, number): Buffer handle, defaults to
@@ -1219,7 +1214,7 @@ get_effective_tabstop({bufnr}) *vim.lsp.util.get_effective_tabstop()*
|softtabstop|
get_line_diagnostics() *vim.lsp.util.get_line_diagnostics()*
- Get list of diagnostics for the current line.
+ Gets list of diagnostics for the current line.
Return: ~
(table) list of `Diagnostic` tables
@@ -1229,7 +1224,7 @@ get_line_diagnostics() *vim.lsp.util.get_line_diagnostics()*
*vim.lsp.util.get_severity_highlight_name()*
get_severity_highlight_name({severity})
- Get the name of a severity's highlight group.
+ Gets the name of a severity's highlight group.
Parameters: ~
{severity} A member of
@@ -1319,7 +1314,7 @@ make_text_document_params() *vim.lsp.util.make_text_document_params()*
*vim.lsp.util.open_floating_preview()*
open_floating_preview({contents}, {filetype}, {opts})
- Show contents in a floating window
+ Shows contents in a floating window.
Parameters: ~
{contents} table of lines to show in window
@@ -1340,7 +1335,7 @@ parse_snippet({input}) *vim.lsp.util.parse_snippet()*
(string) parsed snippet
preview_location({location}) *vim.lsp.util.preview_location()*
- Preview a location in a floating window
+ Previews a location in a floating window
behavior depends on type of location:
• for Location, range is shown (e.g., function definition)
@@ -1355,7 +1350,7 @@ preview_location({location}) *vim.lsp.util.preview_location()*
or nil
set_lines({lines}, {A}, {B}, {new_lines}) *vim.lsp.util.set_lines()*
- Replace text in a range with new text.
+ Replaces text in a range with new text.
CAUTION: Changes in-place!
@@ -1389,7 +1384,7 @@ show_line_diagnostics() *vim.lsp.util.show_line_diagnostics()*
hover window.
symbols_to_items({symbols}, {bufnr}) *vim.lsp.util.symbols_to_items()*
- Convert symbols to quickfix list items
+ Converts symbols to quickfix list items.
Parameters: ~
{symbols} DocumentSymbol[] or SymbolInformation[]
@@ -1414,7 +1409,7 @@ text_document_completion_list_to_complete_items({result}, {prefix})
|complete-items|
trim_empty_lines({lines}) *vim.lsp.util.trim_empty_lines()*
- Remove empty lines from the beginning and end.
+ Removes empty lines from the beginning and end.
Parameters: ~
{lines} (table) list of lines to trim
@@ -1435,4 +1430,4 @@ try_trim_markdown_code_blocks({lines})
Return: ~
(string) filetype or 'markdown' if it was unchanged.
- vim:tw=78:ts=8:sw=2:et:ft=help:norl:
+ vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 050483fb5e..509ed7bf2c 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1461,13 +1461,12 @@ tbl_isempty({t}) *vim.tbl_isempty()*
https://github.com/premake/premake-core/blob/master/src/base/table.lua
tbl_islist({t}) *vim.tbl_islist()*
- Determine whether a Lua table can be treated as an array.
+ Tests if a Lua table can be treated as an array.
- An empty table `{}` will default to being treated as an array.
- Use `vim.emtpy_dict()` to create a table treated as an empty
- dict. Empty tables returned by `rpcrequest()` and `vim.fn`
- functions can be checked using this function whether they
- represent empty API arrays and vimL lists.
+ Empty table `{}` is assumed to be an array, unless it was
+ created by |vim.empty_dict()| or returned as a dict-like |API|
+ or Vimscript result, for example from |rpcrequest()| or
+ |vim.fn|.
Parameters: ~
{t} Table
@@ -1568,4 +1567,4 @@ validate({opt}) *vim.validate()*
• msg: (optional) error string if validation
fails
- vim:tw=78:ts=8:sw=2:et:ft=help:norl:
+ vim:tw=78:ts=8:ft=help:norl: