Dataset Viewer
Auto-converted to Parquet Duplicate
file
stringclasses
134 values
section
stringlengths
0
69
⌀
chunk_id
int64
0
28
text
stringlengths
4
2k
runtime/doc/api.txt
API Usage
0
msgpack-rpc RPC is the main way to control Nvim programmatically. Nvim implements the MessagePack-RPC protocol with these extra (out-of-spec) constraints: 1. Responses must be given in reverse order of requests (like "unwinding a stack"). 2. Nvim processes all messages (requests and notifications) in the order they ...
runtime/doc/api.txt
CONNECTING
0
See |channel-intro| for various ways to open a channel. Channel-opening functions take an rpc key in the options dict. RPC channels can also be opened by other processes connecting to TCP/IP sockets or named pipes listened to by Nvim. Nvim creates a default RPC socket at |startup|, given by |v:servername|. To start wi...
runtime/doc/api.txt
CONNECTING
1
==============================================================================
runtime/doc/api.txt
API Definitions
0
api-types The Nvim C API defines custom types for all function parameters. Some are just typedefs around C99 standard types, others are Nvim-defined data structures. Basic types ~ > API Type C type ------------------------------------------------------------------------ Nil Boolean bool Integer (signed 64-bit int...
runtime/doc/api.txt
API Definitions
1
api-fast Most API functions are "deferred": they are queued on the main loop and processed sequentially with normal input. So if the editor is waiting for user input in a "modal" fashion (e.g. the |hit-enter-prompt|), the request will block. Non-deferred (fast) functions such as |nvim_get_mode()| and |nvim_input()| are...
runtime/doc/api.txt
API metadata
0
The Nvim C API is automatically exposed to RPC by the build system, which parses headers in src/nvim/api/* and generates dispatch-functions mapping RPC API method names to public C API functions, converting/validating arguments and return values. Nvim exposes its API metadata as a Dictionary with these items: - versi...
runtime/doc/api.txt
- version.api_level API version integer
0
- version.api_compatible API is backwards-compatible with this level - version.api_prerelease Declares the API as unstable/unreleased (version.api_prerelease && fn.since == version.api_level) - functions API function signatures, containing |api-types| info describing the return value and parameters. - ui_events |UI| ...
runtime/doc/api.txt
- version.api_level API version integer
1
==============================================================================
runtime/doc/api.txt
API contract
0
The Nvim API is composed of functions and events. - Clients call functions like those described at |api-global|. - Clients can subscribe to |ui-events|, |api-buffer-updates|, etc. - API function names are prefixed with "nvim_". - API event names are prefixed with "nvim_" and suffixed with "_event". As Nvim evolves th...
runtime/doc/api.txt
Global events
0
When a client invokes an API request as an async notification, it is not possible for Nvim to send an error response. Instead, in case of error, the following notification will be sent to the client: nvim_error_event nvim_error_event[{type}, {message}] {type} is a numeric id as defined by api_info().error_types, and ...
runtime/doc/api.txt
Buffer update events
0
API clients can "attach" to Nvim buffers to subscribe to buffer update events. This is similar to |TextChanged| but more powerful and granular. Call |nvim_buf_attach()| to receive these events on the channel: nvim_buf_lines_event nvim_buf_lines_event[{buf}, {changedtick}, {firstline}, {lastline}, {linedata}, {more}] ...
runtime/doc/api.txt
Buffer update events
1
{more} boolean, true for a "multipart" change notification: the current change was chunked into multiple |nvim_buf_lines_event| notifications (e.g. because it was too big).
runtime/doc/api.txt
nvim_buf_changedtick_event[{buf}, {changedtick}]
0
When |b:changedtick| was incremented but no text was changed. Relevant for undo/redo. Properties: ~ {buf} API buffer handle (buffer number) {changedtick} new value of |b:changedtick| for the buffer
runtime/doc/api.txt
nvim_buf_detach_event[{buf}]
0
When buffer is detached (i.e. updates are disabled). Triggered explicitly by |nvim_buf_detach()| or implicitly in these cases: - Buffer was |abandon|ed and 'hidden' is not set. - Buffer was reloaded, e.g. with |:edit| or an external change triggered |:checktime| or 'autoread'. - Generally: whenever the buffer cont...
runtime/doc/api.txt
nvim_buf_detach_event[{buf}]
1
|nvim_buf_attach()| will take keyword args for the callbacks. "on_lines" will receive parameters ("lines", {buf}, {changedtick}, {firstline}, {lastline}, {new_lastline}, {old_byte_size} [, {old_utf32_size}, {old_utf16_size}]). Unlike remote channel events the text contents are not passed. The new text can be accessed i...
runtime/doc/api.txt
Buffer highlighting
0
Nvim allows plugins to add position-based highlights to buffers. This is similar to |matchaddpos()| but with some key differences. The added highlights are associated with a buffer and adapts to line insertions and deletions, similar to signs. It is also possible to manage a set of highlights as a group and delete or r...
runtime/doc/api.txt
Floating windows
0
Floating windows ("floats") are displayed on top of normal windows. This is useful to implement simple widgets, such as tooltips displayed next to the cursor. Floats are fully functional windows supporting user editing, common |api-window| calls, and most window options (except 'statusline'). Two ways to create a floa...
runtime/doc/api.txt
Extended marks
0
Extended marks (extmarks) represent buffer annotations that track text changes in the buffer. They can represent cursors, folds, misspelled words, anything that needs to track a logical location in the buffer over time. |api-indexing| Extmark position works like a "vertical bar" cursor: it exists between characters. T...
runtime/doc/api.txt
Extended marks
1
Namespaces allow any plugin to manage only its own extmarks, ignoring those created by another plugin. Extmark positions changed by an edit will be restored on undo/redo. Creating and deleting extmarks is not a buffer change, thus new undo states are not created for extmark changes. ==================================...
runtime/doc/api.txt
nvim_chan_send({chan}, {data})
0
Send data to channel id. For a job, it writes it to the stdin of the process. For the stdio channel |channel-stdio|, it writes to Nvim's stdout. For an internal terminal instance (|nvim_open_term()|) it writes directly to terminal output. See |channel-bytes| for more information. This function writes raw data, not ...
runtime/doc/api.txt
nvim_create_buf({listed}, {scratch})
0
Creates a new, empty, unnamed buffer. Attributes: ~ Since: 0.4.0 Parameters: ~ • {listed} Sets 'buflisted' • {scratch} Creates a "throwaway" |scratch-buffer| for temporary work (always 'nomodified'). Also sets 'nomodeline' on the buffer. Return: ~ Buffer id, or 0 on error See also: ~ • buf_open_scratch
runtime/doc/api.txt
nvim_del_current_line()
0
Deletes the current line. Attributes: ~ not allowed when |textlock| is active Since: 0.1.0
runtime/doc/api.txt
nvim_del_keymap({mode}, {lhs})
0
Unmaps a global |mapping| for the given mode. To unmap a buffer-local mapping, use |nvim_buf_del_keymap()|. Attributes: ~ Since: 0.4.0 See also: ~ • |nvim_set_keymap()|
runtime/doc/api.txt
nvim_del_mark({name})
0
Deletes an uppercase/file named mark. See |mark-motions|. Note: ~ • Lowercase name (or other buffer-local mark) is an error. Attributes: ~ Since: 0.6.0 Parameters: ~ • {name} Mark name Return: ~ true if the mark was deleted, else false. See also: ~ • |nvim_buf_del_mark()| • |nvim_get_mark()|
runtime/doc/api.txt
nvim_del_var({name})
0
Removes a global (g:) variable. Attributes: ~ Since: 0.1.0 Parameters: ~ • {name} Variable name
runtime/doc/api.txt
nvim_echo({chunks}, {history}, {opts})
0
Prints a message given by a list of [text, hl_group] "chunks". Example: >lua vim.api.nvim_echo({ { 'chunk1-line1\nchunk1-line2\n' }, { 'chunk2-line1' } }, true, {}) < Attributes: ~ Since: 0.5.0 Parameters: ~ • {chunks} List of [text, hl_group] pairs, where each is a text string highlighted by the (optional) name...
runtime/doc/api.txt
nvim_eval_statusline({str}, {opts})
0
Evaluates statusline string. Attributes: ~ |api-fast| Since: 0.6.0 Parameters: ~ • {str} Statusline string (see 'statusline'). • {opts} Optional parameters. • winid: (number) |window-ID| of the window to use as context for statusline. • maxwidth: (number) Maximum width of statusline. • fillchar: (string) Char...
runtime/doc/api.txt
nvim_exec_lua({code}, {args})
0
Execute Lua code. Parameters (if any) are available as ... inside the chunk. The chunk can return a value. Only statements are executed. To evaluate an expression, prefix it with return: return my_function(...) Attributes: ~ |RPC| only Since: 0.5.0 Parameters: ~ • {code} Lua code to execute • {args} Arguments ...
runtime/doc/api.txt
nvim_feedkeys({keys}, {mode}, {escape_ks})
0
Sends input-keys to Nvim, subject to various quirks controlled by mode flags. This is a blocking call, unlike |nvim_input()|. On execution error: does not fail, but updates v:errmsg. To input sequences like <C-o> use |nvim_replace_termcodes()| (typically with escape_ks=false) to replace |keycodes|, then pass the re...
runtime/doc/api.txt
nvim_get_api_info()
0
Returns a 2-tuple (Array), where item 0 is the current channel id and item 1 is the |api-metadata| map (Dict). Attributes: ~ |api-fast| |RPC| only Since: 0.1.0 Return: ~ 2-tuple [{channel-id}, {api-metadata}]
runtime/doc/api.txt
nvim_get_chan_info({chan})
0
Gets information about a channel. See |nvim_list_uis()| for an example of how to get channel info. Attributes: ~ Since: 0.3.0 Parameters: ~ • {chan} channel_id, or 0 for current channel Return: ~ Channel info dict with these keys: • "id" Channel id. • "argv" (optional) Job arguments list. • "stream" Stream un...
runtime/doc/api.txt
nvim_get_color_by_name({name})
0
Returns the 24-bit RGB value of a |nvim_get_color_map()| color name or "#rrggbb" hexadecimal string. Example: >vim :echo nvim_get_color_by_name("Pink") :echo nvim_get_color_by_name("#cbcbcb") < Attributes: ~ Since: 0.1.0 Parameters: ~ • {name} Color name or "#rrggbb" string Return: ~ 24-bit RGB value, or -1 f...
runtime/doc/api.txt
nvim_get_color_map()
0
Returns a map of color names and RGB values. Keys are color names (e.g. "Aqua") and values are 24-bit RGB color values (e.g. 65535). Attributes: ~ Since: 0.1.0 Return: ~ Map of color names and RGB values.
runtime/doc/api.txt
nvim_get_context({opts})
0
Gets a map of the current editor state. Attributes: ~ Since: 0.4.0 Parameters: ~ • {opts} Optional parameters. • types: List of |context-types| ("regs", "jumps", "bufs", "gvars", …) to gather, or empty for "all". Return: ~ map of global |context|.
runtime/doc/api.txt
nvim_get_current_buf()
0
Gets the current buffer. Attributes: ~ Since: 0.1.0 Return: ~ Buffer id
runtime/doc/api.txt
nvim_get_current_line()
0
Gets the current line. Attributes: ~ Since: 0.1.0 Return: ~ Current line string
runtime/doc/api.txt
nvim_get_current_tabpage()
0
Gets the current tabpage. Attributes: ~ Since: 0.1.0 Return: ~ |tab-ID|
runtime/doc/api.txt
nvim_get_current_win()
0
Gets the current window. Attributes: ~ Since: 0.1.0 Return: ~ |window-ID|
runtime/doc/api.txt
nvim_get_hl({ns_id}, {opts})
0
Gets all or specific highlight groups in a namespace. Note: ~ • When the link attribute is defined in the highlight definition map, other attributes will not be taking effect (see |:hi-link|). Attributes: ~ Since: 0.9.0 Parameters: ~ • {ns_id} Get highlight groups for namespace ns_id |nvim_get_namespaces()|. Us...
runtime/doc/api.txt
nvim_get_hl_id_by_name({name})
0
Gets a highlight group by name similar to |hlID()|, but allocates a new ID if not present. Attributes: ~ Since: 0.5.0
runtime/doc/api.txt
nvim_get_hl_ns({opts})
0
Gets the active highlight namespace. Attributes: ~ Since: 0.10.0 Parameters: ~ • {opts} Optional parameters • winid: (number) |window-ID| for retrieving a window's highlight namespace. A value of -1 is returned when |nvim_win_set_hl_ns()| has not been called for the window (or was called with a namespace of -1)...
runtime/doc/api.txt
nvim_get_keymap({mode})
0
Gets a list of global (non-buffer-local) |mapping| definitions. Attributes: ~ Since: 0.2.1 Parameters: ~ • {mode} Mode short-name ("n", "i", "v", ...) Return: ~ Array of |maparg()|-like dictionaries describing mappings. The "buffer" key is always zero.
runtime/doc/api.txt
nvim_get_mark({name}, {opts})
0
Returns a (row, col, buffer, buffername) tuple representing the position of the uppercase/file named mark. "End of line" column position is returned as |v:maxcol| (big number). See |mark-motions|. Marks are (1,0)-indexed. |api-indexing| Note: ~ • Lowercase name (or other buffer-local mark) is an error. Attributes...
runtime/doc/api.txt
nvim_get_mode()
0
Gets the current mode. |mode()| "blocking" is true if Nvim is waiting for input. Attributes: ~ |api-fast| Since: 0.2.0 Return: ~ Dict { "mode": String, "blocking": Boolean }
runtime/doc/api.txt
nvim_get_proc({pid})
0
Gets info describing process pid. Attributes: ~ Since: 0.3.0 Return: ~ Map of process properties, or NIL if process not found.
runtime/doc/api.txt
nvim_get_proc_children({pid})
0
Gets the immediate children of process pid. Attributes: ~ Since: 0.3.0 Return: ~ Array of child process ids, empty if process not found.
runtime/doc/api.txt
nvim_get_runtime_file({name}, {all})
0
Finds files in runtime directories, in 'runtimepath' order. "name" can contain wildcards. For example nvim_get_runtime_file("colors/*.{vim,lua}", true) will return all color scheme files. Always use forward slashes (/) in the search pattern for subdirectories regardless of platform. It is not an error to not find ...
runtime/doc/api.txt
nvim_get_var({name})
0
Gets a global (g:) variable. Attributes: ~ Since: 0.1.0 Parameters: ~ • {name} Variable name Return: ~ Variable value
runtime/doc/api.txt
nvim_get_vvar({name})
0
Gets a v: variable. Attributes: ~ Since: 0.1.0 Parameters: ~ • {name} Variable name Return: ~ Variable value
runtime/doc/api.txt
nvim_input({keys})
0
Queues raw user-input. Unlike |nvim_feedkeys()|, this uses a low-level input buffer and the call is non-blocking (input is processed asynchronously by the eventloop). To input blocks of text, |nvim_paste()| is much faster and should be preferred. On execution error: does not fail, but updates v:errmsg. Note: ~ •...
runtime/doc/api.txt
nvim_list_bufs()
0
Gets the current list of buffers. Includes unlisted (unloaded/deleted) buffers, like :ls!. Use |nvim_buf_is_loaded()| to check if a buffer is loaded. Attributes: ~ Since: 0.1.0 Return: ~ List of buffer ids
runtime/doc/api.txt
nvim_list_chans()
0
Get information about all open channels. Attributes: ~ Since: 0.3.0 Return: ~ Array of Dictionaries, each describing a channel with the format specified at |nvim_get_chan_info()|.
runtime/doc/api.txt
nvim_list_runtime_paths()
0
Gets the paths contained in |runtime-search-path|. Attributes: ~ Since: 0.1.0 Return: ~ List of paths
runtime/doc/api.txt
nvim_list_tabpages()
0
Gets the current list of |tab-ID|s. Attributes: ~ Since: 0.1.0 Return: ~ List of |tab-ID|s
runtime/doc/api.txt
nvim_list_uis()
0
Gets a list of dictionaries representing attached UIs. Example: The Nvim builtin |TUI| sets its channel info as described in |startup-tui|. In particular, it sets client.name to "nvim-tui". So you can check if the TUI is running by inspecting the client name of each UI: >lua vim.print(vim.api.nvim_get_chan_info(vim...
runtime/doc/api.txt
nvim_list_wins()
0
Gets the current list of all |window-ID|s in all tabpages. Attributes: ~ Since: 0.1.0 Return: ~ List of |window-ID|s
runtime/doc/api.txt
nvim_load_context({dict})
0
Sets the current editor state from the given |context| map. Attributes: ~ Since: 0.4.0 Parameters: ~ • {dict} |Context| map.
runtime/doc/api.txt
nvim_open_term({buffer}, {opts})
0
Open a terminal instance in a buffer By default (and currently the only option) the terminal will not be connected to an external process. Instead, input sent on the channel will be echoed directly by the terminal. This is useful to display ANSI terminal sequences returned as part of an RPC message, or similar. No...
runtime/doc/api.txt
nvim_paste({data}, {crlf}, {phase})
0
Pastes at cursor (in any mode), and sets "redo" so dot (|.|) will repeat the input. UIs call this to implement "paste", but it's also intended for use by scripts to input large, dot-repeatable blocks of text (as opposed to |nvim_input()| which is subject to mappings/events and is thus much slower). Invokes the |vi...
runtime/doc/api.txt
nvim_put({lines}, {type}, {after}, {follow})
0
Puts text at cursor, in any mode. For dot-repeatable input, use |nvim_paste()|. Compare |:put| and |p| which are always linewise. Attributes: ~ not allowed when |textlock| is active Since: 0.4.0 Parameters: ~ • {lines} |readfile()|-style list of lines. |channel-lines| • {type} Edit behavior: any |getregtype()| ...
runtime/doc/api.txt
nvim_put({lines}, {type}, {after}, {follow})
1
nvim_set_client_info() nvim_set_client_info({name}, {version}, {type}, {methods}, {attributes}) Self-identifies the client, and sets optional flags on the channel. Defines the client object returned by |nvim_get_chan_info()|. Clients should call this just after connecting, to provide hints for debugging and orchest...
runtime/doc/api.txt
nvim_put({lines}, {type}, {after}, {follow})
2
Parameters: ~ • {name} Client short-name. Sets the client.name field of |nvim_get_chan_info()|. • {version} Dict describing the version, with these (optional) keys: • "major" major version (defaults to 0 if not set, for no release yet) • "minor" minor version • "patch" patch number • "prerelease" string describ...
runtime/doc/api.txt
nvim_set_current_buf({buffer})
0
Sets the current window's buffer to buffer. Attributes: ~ not allowed when |textlock| is active or in the |cmdwin| Since: 0.1.0 Parameters: ~ • {buffer} Buffer id
runtime/doc/api.txt
nvim_set_current_dir({dir})
0
Changes the global working directory. Attributes: ~ Since: 0.1.0 Parameters: ~ • {dir} Directory path
runtime/doc/api.txt
nvim_set_current_line({line})
0
Sets the text on the current line. Attributes: ~ not allowed when |textlock| is active Since: 0.1.0 Parameters: ~ • {line} Line contents
runtime/doc/api.txt
nvim_set_current_tabpage({tabpage})
0
Sets the current tabpage. Attributes: ~ not allowed when |textlock| is active or in the |cmdwin| Since: 0.1.0 Parameters: ~ • {tabpage} |tab-ID| to focus
runtime/doc/api.txt
nvim_set_current_win({window})
0
Sets the current window (and tabpage, implicitly). Attributes: ~ not allowed when |textlock| is active or in the |cmdwin| Since: 0.1.0 Parameters: ~ • {window} |window-ID| to focus
runtime/doc/api.txt
nvim_set_hl({ns_id}, {name}, {val})
0
Sets a highlight group. Note: ~ • Unlike the :highlight command which can update a highlight group, this function completely replaces the definition. For example: nvim_set_hl(0, 'Visual', {}) will clear the highlight group 'Visual'. • The fg and bg keys also accept the string values "fg" or "bg" which act as ali...
runtime/doc/api.txt
nvim_set_hl_ns({ns_id})
0
Set active namespace for highlights defined with |nvim_set_hl()|. This can be set for a single window, see |nvim_win_set_hl_ns()|. Attributes: ~ Since: 0.8.0 Parameters: ~ • {ns_id} the namespace to use
runtime/doc/api.txt
nvim_set_hl_ns_fast({ns_id})
0
Set active namespace for highlights defined with |nvim_set_hl()| while redrawing. This function meant to be called while redrawing, primarily from |nvim_set_decoration_provider()| on_win and on_line callbacks, which are allowed to change the namespace during a redraw cycle. Attributes: ~ |api-fast| Since: 0.8.0 ...
runtime/doc/api.txt
nvim_set_keymap({mode}, {lhs}, {rhs}, {opts})
0
Sets a global |mapping| for the given mode. To set a buffer-local mapping, use |nvim_buf_set_keymap()|. Unlike |:map|, leading/trailing whitespace is accepted as part of the {lhs} or {rhs}. Empty {rhs} is <Nop>. |keycodes| are replaced as usual. Example: >vim call nvim_set_keymap('n', ' <NL>', '', {'nowait': v:tru...
runtime/doc/api.txt
nvim_set_var({name}, {value})
0
Sets a global (g:) variable. Attributes: ~ Since: 0.1.0 Parameters: ~ • {name} Variable name • {value} Variable value
runtime/doc/api.txt
nvim_set_vvar({name}, {value})
0
Sets a v: variable, if it is not readonly. Attributes: ~ Since: 0.4.0 Parameters: ~ • {name} Variable name • {value} Variable value
runtime/doc/api.txt
nvim_strwidth({text})
0
Calculates the number of display cells occupied by text. Control characters including <Tab> count as one cell. Attributes: ~ Since: 0.1.0 Parameters: ~ • {text} Some text Return: ~ Number of cells
runtime/doc/api.txt
nvim__complete_set({index}, {opts})
0
EXPERIMENTAL: this API may change in the future. Sets info for the completion item at the given index. If the info text was shown in a window, returns the window and buffer ids, or empty dict if not shown. Parameters: ~ • {index} Completion candidate index • {opts} Optional parameters. • info: (string) info text...
runtime/doc/api.txt
nvim__get_runtime({pat}, {all}, {opts})
0
Find files in runtime directories Attributes: ~ |api-fast| Since: 0.6.0 Parameters: ~ • {pat} pattern of files to search for • {all} whether to return all matches or only the first • {opts} is_lua: only search Lua subdirs Return: ~ list of absolute paths to the found files
runtime/doc/api.txt
nvim__id({obj})
0
Returns object given as argument. This API function is used for testing. One should not rely on its presence in plugins. Parameters: ~ • {obj} Object to return. Return: ~ its argument.
runtime/doc/api.txt
nvim__id_array({arr})
0
Returns array given as argument. This API function is used for testing. One should not rely on its presence in plugins. Parameters: ~ • {arr} Array to return. Return: ~ its argument.
runtime/doc/api.txt
nvim__id_dict({dct})
0
Returns dict given as argument. This API function is used for testing. One should not rely on its presence in plugins. Parameters: ~ • {dct} Dict to return. Return: ~ its argument.
runtime/doc/api.txt
nvim__id_float({flt})
0
Returns floating-point value given as argument. This API function is used for testing. One should not rely on its presence in plugins. Parameters: ~ • {flt} Value to return. Return: ~ its argument.
runtime/doc/api.txt
nvim__inspect_cell({grid}, {row}, {col})
0
NB: if your UI doesn't use hlstate, this will not return hlstate first time.
runtime/doc/api.txt
nvim__invalidate_glyph_cache()
0
For testing. The condition in schar_cache_clear_if_full is hard to reach, so this function can be used to force a cache clear in a test.
runtime/doc/api.txt
nvim__redraw({opts})
0
EXPERIMENTAL: this API may change in the future. Instruct Nvim to redraw various components. Attributes: ~ Since: 0.10.0 Parameters: ~ • {opts} Optional parameters. • win: Target a specific |window-ID| as described below. • buf: Target a specific buffer number as described below. • flush: Update the screen with...
runtime/doc/api.txt
nvim__stats()
0
Gets internal stats. Return: ~ Map of various internal stats. ==============================================================================
runtime/doc/api.txt
Vimscript Functions
0
nvim_call_dict_function() nvim_call_dict_function({dict}, {fn}, {args}) Calls a Vimscript |Dictionary-function| with the given arguments. On execution error: fails with Vimscript error, updates v:errmsg. Attributes: ~ Since: 0.3.0 Parameters: ~ • {dict} Dict, or String evaluating to a Vimscript |self| dict • {fn...
runtime/doc/api.txt
nvim_call_function({fn}, {args})
0
Calls a Vimscript function with the given arguments. On execution error: fails with Vimscript error, updates v:errmsg. Attributes: ~ Since: 0.1.0 Parameters: ~ • {fn} Function to call • {args} Function arguments packed in an Array Return: ~ Result of the function call
runtime/doc/api.txt
nvim_command({command})
0
Executes an Ex command. On execution error: fails with Vimscript error, updates v:errmsg. Prefer |nvim_cmd()| or |nvim_exec2()| instead. To modify an Ex command in a structured way before executing it, modify the result of |nvim_parse_cmd()| then pass it to |nvim_cmd()|. Attributes: ~ Since: 0.1.0 Parameters: ~ ...
runtime/doc/api.txt
nvim_eval({expr})
0
Evaluates a Vimscript |expression|. Dicts and Lists are recursively expanded. On execution error: fails with Vimscript error, updates v:errmsg. Attributes: ~ Since: 0.1.0 Parameters: ~ • {expr} Vimscript expression string Return: ~ Evaluation result or expanded object
runtime/doc/api.txt
nvim_exec2({src}, {opts})
0
Executes Vimscript (multiline block of Ex commands), like anonymous |:source|. Unlike |nvim_command()| this function supports heredocs, script-scope (s:), etc. On execution error: fails with Vimscript error, updates v:errmsg. Attributes: ~ Since: 0.9.0 Parameters: ~ • {src} Vimscript code • {opts} Optional par...
runtime/doc/api.txt
nvim_exec2({src}, {opts})
1
Return: ~ • AST: top-level dict with these keys: • "error": Dict with error, present only if parser saw some error. Contains the following keys: • "message": String, error message in printf format, translated. Must contain exactly one "%.*s". • "arg": String, error message argument. • "len": Amount of bytes succ...
runtime/doc/api.txt
nvim_exec2({src}, {opts})
2
"kCCStrategy" prefix. Only present for "Comparison" nodes. • "augmentation": String, augmentation type for "Assignment" nodes. Is either an empty string, "Add", "Subtract" or "Concat" for "=", "+=", "-=" or ".=" respectively. • "invert": Boolean, true if result of comparison needs to be inverted. Only present fo...
runtime/doc/api.txt
nvim_exec2({src}, {opts})
3
==============================================================================
runtime/doc/api.txt
Command Functions
0
nvim_buf_create_user_command() nvim_buf_create_user_command({buffer}, {name}, {command}, {opts}) Creates a buffer-local command |user-commands|. Attributes: ~ Since: 0.7.0 Parameters: ~ • {buffer} Buffer id, or 0 for current buffer. See also: ~ • nvim_create_user_command nvim_buf_del_user_command() nvim_buf_del...
runtime/doc/api.txt
nvim_buf_get_commands({buffer}, {opts})
0
Gets a map of buffer-local |user-commands|. Attributes: ~ Since: 0.3.0 Parameters: ~ • {buffer} Buffer id, or 0 for current buffer • {opts} Optional parameters. Currently not used. Return: ~ Map of maps describing commands.
runtime/doc/api.txt
nvim_cmd({cmd}, {opts})
0
Executes an Ex command. Unlike |nvim_command()| this command takes a structured Dict instead of a String. This allows for easier construction and manipulation of an Ex command. This also allows for things such as having spaces inside a command argument, expanding filenames in a command that otherwise doesn't expan...
runtime/doc/api.txt
nvim_cmd({cmd}, {opts})
1
Parameters: ~ • {name} Name of the new user command. Must begin with an uppercase letter. • {command} Replacement command to execute when this user command is executed. When called from Lua, the command can also be a Lua function. The function is called with a single table argument that contains the following key...
runtime/doc/api.txt
nvim_del_user_command({name})
0
Delete a user-defined command. Attributes: ~ Since: 0.7.0 Parameters: ~ • {name} Name of the command to delete.
runtime/doc/api.txt
nvim_get_commands({opts})
0
Gets a map of global (non-buffer-local) Ex commands. Currently only |user-commands| are supported, not builtin Ex commands. Attributes: ~ Since: 0.3.0 Parameters: ~ • {opts} Optional parameters. Currently only supports {"builtin":false} Return: ~ Map of maps describing commands. See also: ~ • |nvim_get_all_opt...
runtime/doc/api.txt
nvim_parse_cmd({str}, {opts})
0
Parse command line. Doesn't check the validity of command arguments. Attributes: ~ |api-fast| Since: 0.8.0 Parameters: ~ • {str} Command line string to parse. Cannot contain "\n". • {opts} Optional parameters. Reserved for future use.
runtime/doc/api.txt
nvim_parse_cmd({str}, {opts})
1
Return: ~ Dict containing command information, with these keys: • cmd: (string) Command name. • range: (array) (optional) Command range (<line1> <line2>). Omitted if command doesn't accept a range. Otherwise, has no elements if no range was specified, one element if only a single range item was specified, or two ...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
41