Get the bufnr of Buffer
Total number of lines in buffer
Get lines in buffer
Get buffer name
Set current buffer name
Is current buffer valid
Attach to buffer to listen to buffer events Detach from buffer to stop listening to buffer events
Set to true if the initial notification should contain
the whole buffer. If so, the first notification will be a
nvim_buf_lines_event
. Otherwise, the first notification will be
a nvim_buf_changedtick_event
Attach to buffer to listen to buffer events Detach from buffer to stop listening to buffer events
Adds a highlight to buffer.
This can be used for plugins which dynamically generate highlights to a buffer (like a semantic highlighter or linter). The function adds a single highlight to a buffer. Unlike matchaddpos() highlights follow changes to line numbering (as lines are inserted/removed above the highlighted line), like signs and marks do.
"src_id" is useful for batch deletion/updating of a set of highlights. When called with src_id = 0, an unique source id is generated and returned. Succesive calls can pass in it as "src_id" to add new highlights to the same source group. All highlights in the same group can then be cleared with nvim_buf_clear_highlight. If the highlight never will be manually deleted pass in -1 for "src_id".
If "hl_group" is the empty string no highlight is added, but a new src_id is still returned. This is useful for an external plugin to synchrounously request an unique src_id at initialization, and later asynchronously add and clear highlights in response to buffer changes.
Append a string or list of lines to end of buffer
Attaches a callback for only the rejection of the Promise.
The callback to execute when the Promise is rejected.
A Promise for the completion of the callback.
Clears highlights from a given source group and a range of lines
To clear a source group in the entire buffer, pass in 1 and -1 to lineStart and lineEnd respectively.
Delete a scoped variable
Gets keymap
Get specific lines of buffer
Retrieves a scoped option depending on type of this
Retrieves a scoped variable depending on type (using this.prefix
)
Insert lines at start
index
Listens to buffer for events
Get mark position given mark name
request
is basically the same except you can choose to wait forpromise to be resolved
Remove lines at index
Replace lines starting at start
index
Set lines of buffer given indeces
Set scoped option
Set a scoped variable
Attaches callbacks for the resolution and/or rejection of the Promise.
The callback to execute when the Promise is resolved.
The callback to execute when the Promise is rejected.
A Promise for the completion of which ever callback is executed.
Generated using TypeDoc
Gets a changed tick of a buffer