|
String | nvim_command_output (uint64_t channel_id, String command, Error *err) FUNC_API_DEPRECATED_SINCE(7) |
|
Object | nvim_execute_lua (String code, Array args, Error *err) FUNC_API_REMOTE_ONLY |
|
Integer | nvim_buf_get_number (Buffer buffer, Error *err) FUNC_API_DEPRECATED_SINCE(2) |
|
void | nvim_buf_clear_highlight (Buffer buffer, Integer ns_id, Integer line_start, Integer line_end, Error *err) FUNC_API_DEPRECATED_SINCE(7) |
|
Integer | nvim_buf_set_virtual_text (Buffer buffer, Integer src_id, Integer line, Array chunks, Dictionary opts, Error *err) FUNC_API_DEPRECATED_SINCE(8) |
|
void | buffer_insert (Buffer buffer, Integer lnum, ArrayOf(String) lines, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
String | buffer_get_line (Buffer buffer, Integer index, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
void | buffer_set_line (Buffer buffer, Integer index, String line, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
void | buffer_del_line (Buffer buffer, Integer index, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
| ArrayOf (String) |
|
void | buffer_set_line_slice (Buffer buffer, Integer start, Integer end, Boolean include_start, Boolean include_end, ArrayOf(String) replacement, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
Object | buffer_set_var (Buffer buffer, String name, Object value, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
Object | buffer_del_var (Buffer buffer, String name, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
Object | window_set_var (Window window, String name, Object value, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
Object | window_del_var (Window window, String name, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
Object | tabpage_set_var (Tabpage tabpage, String name, Object value, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
Object | tabpage_del_var (Tabpage tabpage, String name, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
Object | vim_set_var (String name, Object value, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
Object | vim_del_var (String name, Error *err) FUNC_API_DEPRECATED_SINCE(1) |
|
Set the virtual text (annotation) for a buffer line.
- Deprecated:
- use nvim_buf_set_extmark to use full virtual text functionality.
The text will be placed after the buffer text. Virtual text will never cause reflow, rather virtual text will be truncated at the end of the screen line. The virtual text will begin one cell (|lcs-eol| or space) after the ordinary text.
Namespaces are used to support batch deletion/updating of virtual text. To create a namespace, use |nvim_create_namespace()|. Virtual text is cleared using |nvim_buf_clear_namespace()|. The same ns_id
can be used for both virtual text and highlights added by |nvim_buf_add_highlight()|, both can then be cleared with a single call to |nvim_buf_clear_namespace()|. If the virtual text never will be cleared by an API call, pass ns_id = -1
.
As a shorthand, ns_id = 0
can be used to create a new namespace for the virtual text, the allocated id is then returned.
- Parameters
-
| buffer | Buffer handle, or 0 for current buffer |
| ns_id | Namespace to use or 0 to create a namespace, or -1 for a ungrouped annotation |
| line | Line to annotate with virtual text (zero-indexed) |
| chunks | A list of [text, hl_group] arrays, each representing a text chunk with specified highlight. hl_group element can be omitted for no highlight. |
| opts | Optional parameters. Currently not used. |
[out] | err | Error details, if any |
- Returns
- The ns_id that was used