diff options
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r-- | runtime/doc/api.txt | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 1af327e572..c372bb401e 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -310,6 +310,7 @@ Here is an example for creating a float with scratch buffer: > call nvim_win_set_option(win, 'winhl', 'Normal:MyHighlight') > To close the float, |nvim_win_close()| can be used. + ============================================================================== Global Functions *api-global* @@ -748,6 +749,21 @@ nvim_open_win({buffer}, {enter}, {config}) *nvim_open_win()* an external top-level window. Currently accepts no other positioning configuration together with this. + • `style` : Configure the apparance of the window. + Currently only takes one non-empty value: + • "minimal" Nvim will display the window with + many UI options disabled. This is useful + when displaing a temporary float where the + text should not be edited. Disables + 'number', 'relativenumber', 'cursorline', + 'cursorcolumn', 'spell' and 'list' options. + 'signcolumn' is changed to `auto` . The + end-of-buffer region is hidden by setting + `eob` flag of 'fillchars' to a space char, + and clearing the |EndOfBuffer| region in + 'winhighlight'. + • top-level window. Currently accepts no other + positioning configuration together with this. Return: ~ Window handle, or 0 on error @@ -875,6 +891,23 @@ nvim_get_color_map() *nvim_get_color_map()* Return: ~ Map of color names and RGB values. +nvim_get_context({types}) *nvim_get_context()* + Gets a map of the current editor state. + + Parameters: ~ + {types} Context types ("regs", "jumps", "buflist", + "gvars", ...) to gather, or NIL for all (see + |context-types|). + + Return: ~ + map of global |context|. + +nvim_load_context({dict}) *nvim_load_context()* + Sets the current editor state from the given |context| map. + + Parameters: ~ + {dict} |Context| map. + nvim_get_mode() *nvim_get_mode()* Gets the current mode. |mode()| "blocking" is true if Nvim is waiting for input. @@ -1276,7 +1309,7 @@ nvim_select_popupmenu_item({item}, {insert}, {finish}, {opts}) Implies `insert` . {opts} Optional parameters. Reserved for future use. -nvim__inspect_cell({row}, {col}) *nvim__inspect_cell()* +nvim__inspect_cell({grid}, {row}, {col}) *nvim__inspect_cell()* TODO: Documentation @@ -1306,7 +1339,8 @@ nvim_buf_line_count({buffer}) *nvim_buf_line_count()* Line count, or 0 for unloaded buffer. |api-buffer| nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()* - Activates buffer-update events on the channel. + Activates buffer-update events on a channel, or as lua + callbacks. Parameters: ~ {buffer} Buffer handle, or 0 for current buffer @@ -1315,14 +1349,19 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()* first notification will be a `nvim_buf_lines_event` . Otherwise, the first notification will be a - `nvim_buf_changedtick_event` - {opts} Optional parameters. Reserved for future - use. + `nvim_buf_changedtick_event` . Not used for + lua callbacks. + {opts} Optional parameters. `on_lines` : lua + callback received on change. + `on_changedtick` : lua callback received on + changedtick increment without text change. + See |api-buffer-updates-lua| for more + information Return: ~ False when updates couldn't be enabled because the buffer isn't loaded or `opts` contained an invalid key; otherwise - True. + True. TODO: LUA_API_NO_EVAL nvim_buf_detach({buffer}) *nvim_buf_detach()* Deactivates buffer-update events on the channel. |