diff options
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r-- | runtime/doc/api.txt | 105 |
1 files changed, 78 insertions, 27 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 1ad0a6883e..1573bec7ac 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -531,6 +531,20 @@ nvim__get_hl_defs({ns_id}) *nvim__get_hl_defs()* nvim__get_lib_dir() *nvim__get_lib_dir()* TODO: Documentation +nvim__get_runtime({pat}, {all}, {*opts}) *nvim__get_runtime()* + Find files in runtime directories + + Attributes: ~ + {fast} + + Parameters: ~ + {pat} pattern of files to search for + {all} whether to return all matches or only the first + {options} is_lua: only search lua subdirs + + Return: ~ + list of absolute paths to the found files + nvim__id({obj}) *nvim__id()* Returns object given as argument. @@ -582,6 +596,9 @@ nvim__id_float({flt}) *nvim__id_float()* nvim__inspect_cell({grid}, {row}, {col}) *nvim__inspect_cell()* TODO: Documentation +nvim__runtime_inspect() *nvim__runtime_inspect()* + TODO: Documentation + nvim__screenshot({path}) *nvim__screenshot()* TODO: Documentation @@ -802,6 +819,39 @@ nvim_eval({expr}) *nvim_eval()* Return: ~ Evaluation result or expanded object +nvim_eval_statusline({str}, {*opts}) *nvim_eval_statusline()* + Evaluates statusline string. + + Attributes: ~ + {fast} + + 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) Character to fill blank + spaces in the statusline (see 'fillchars'). + • highlights: (boolean) Return highlight + information. + • use_tabline: (boolean) Evaluate tabline instead + of statusline. When |TRUE|, {winid} is ignored. + + Return: ~ + Dictionary containing statusline information, with these + keys: + • str: (string) Characters that will be displayed on the + statusline. + • width: (number) Display width of the statusline. + • highlights: Array containing highlight information of + the statusline. Only included when the "highlights" key + in {opts} is |TRUE|. Each element of the array is a + |Dictionary| with these keys: + • start: (number) Byte index (0-based) of first + character that uses the highlight. + • group: (string) Name of highlight group. + nvim_exec({src}, {output}) *nvim_exec()* Executes Vimscript (multiline block of Ex-commands), like anonymous |:source|. @@ -1827,7 +1877,7 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()* callbacks. {opts} Optional parameters. • on_lines: Lua callback invoked on change. - Return`true`to detach. Args: + Return `true` to detach. Args: • the string "lines" • buffer handle • b:changedtick @@ -1843,7 +1893,7 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()* • on_bytes: lua callback invoked on change. This callback receives more granular information about the change compared to - on_lines. Return`true`to detach. Args: + on_lines. Return `true` to detach. Args: • the string "bytes" • buffer handle • b:changedtick @@ -2282,7 +2332,7 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {*opts}) • hl_mode : control how highlights are combined with the highlights of the text. Currently only affects virt_text highlights, but might - affect`hl_group`in later versions. + affect `hl_group` in later versions. • "replace": only show the virt_text color. This is the default • "combine": combine with background text @@ -2692,28 +2742,29 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()* {buffer} Buffer to display, or 0 for current buffer {enter} Enter the window (make it the current window) {config} Map defining the window configuration. Keys: - • `relative`: Sets the window layout to "floating", placed - at (row,col) coordinates relative to: + • relative: Sets the window layout to + "floating", placed at (row,col) coordinates + relative to: • "editor" The global editor grid • "win" Window given by the `win` field, or current window. • "cursor" Cursor position in current window. - • `win` : |window-ID| for relative="win". - • `anchor`: Decides which corner of the float to place - at (row,col): + • win: |window-ID| for relative="win". + • anchor: Decides which corner of the float to + place at (row,col): • "NW" northwest (default) • "NE" northeast • "SW" southwest • "SE" southeast - • `width` : Window width (in character cells). + • width: Window width (in character cells). Minimum of 1. - • `height` : Window height (in character cells). + • height: Window height (in character cells). Minimum of 1. - • `bufpos`: Places float relative to buffer text (only - when relative="win"). Takes a tuple of - zero-indexed [line, column].`row`and`col`if given are applied relative to this + • bufpos: Places float relative to buffer text + (only when relative="win"). Takes a tuple of + zero-indexed [line, column]. `row` and `col` if given are applied relative to this position, else they default to: • `row=1` and `col=0` if `anchor` is "NW" or "NE" @@ -2721,19 +2772,19 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()* "SE" (thus like a tooltip near the buffer text). - • `row` : Row position in units of "screen cell + • row: Row position in units of "screen cell height", may be fractional. - • `col` : Column position in units of "screen - cell width", may be fractional. - • `focusable` : Enable focus by user actions + • col: Column position in units of "screen cell + width", may be fractional. + • focusable: Enable focus by user actions (wincmds, mouse events). Defaults to true. Non-focusable windows can be entered by |nvim_set_current_win()|. - • `external` : GUI should display the window as - an external top-level window. Currently - accepts no other positioning configuration - together with this. - • `zindex`: Stacking order. floats with higher`zindex`go on top on floats with lower indices. Must + • external: GUI should display the window as an + external top-level window. Currently accepts + no other positioning configuration together + with this. + • zindex: Stacking order. floats with higher `zindex` go on top on floats with lower indices. Must be larger than zero. The following screen elements have hard-coded z-indices: • 100: insert completion popupmenu @@ -2744,7 +2795,7 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()* are recommended, unless there is a good reason to overshadow builtin elements. - • `style`: Configure the appearance of the window. + • style: Configure the appearance of the window. Currently only takes one non-empty value: • "minimal" Nvim will display the window with many UI options disabled. This is useful @@ -2759,9 +2810,9 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()* and clearing the |EndOfBuffer| region in 'winhighlight'. - • `border`: Style of (optional) window border. This can - either be a string or an array. The string - values are + • border: Style of (optional) window border. + This can either be a string or an array. The + string values are • "none": No border (default). • "single": A single line box. • "double": A double line box. @@ -2791,7 +2842,7 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()* It could also be specified by character: [ {"+", "MyCorner"}, {"x", "MyBorder"} ]. - • `noautocmd` : If true then no buffer-related + • noautocmd: If true then no buffer-related autocommand events such as |BufEnter|, |BufLeave| or |BufWinEnter| may fire from calling this function. |