import * as denopsStd from "https://deno.land/x/denops_std@v6.5.1/function/nvim/mod.ts";
A module to provide functions of Neovim native functions.
import type { Entrypoint } from "https://deno.land/x/denops_std@v6.5.1/mod.ts";
import * as nvimFn from "https://deno.land/x/denops_std@v6.5.1/function/nvim/mod.ts";
export const main: Entrypoint = async (denops) => {
// nvimFn holds functions exists only in Neovim
console.log(nvimFn.api_info(denops));
}
Functions
Returns Dictionary of | |
Close a channel or a specific stream associated with it.
For a job, {stream} can be one of "stdin", "stdout",
"stderr" or "rpc" (closes stdin/stdout for a job started
with | |
Send data to channel {id}. For a job, it writes it to the
stdin of the process. For the stdio channel | |
Returns a | |
Pops and restores the | |
Pushes the current editor state ( | |
Sets the | |
Returns the size of the | |
Adds a watcher to a dictionary. A dictionary watcher is identified by three components: | |
Removes a watcher added with | |
f id | Returns a |
Return the PID (process id) of | |
Resize the pseudo terminal window of | |
Spawns {cmd} as a job. If {cmd} is a List it runs directly (no 'shell'). If {cmd} is a String it runs in the 'shell', like this: | |
Stop | |
Waits for jobs and their | |
Returns a | |
Convert a list of VimL objects to msgpack. Returned value is a
| |
Convert a | |
Find files in runtime directories | |
Returns object given as argument. | |
Returns array given as argument. | |
Returns dictionary given as argument. | |
Returns floating-point value given as argument. | |
NB: if your UI doesn't use hlstate, this will not return hlstate first time. | |
Gets internal stats. | |
Adds a highlight to buffer. | |
Activates buffer-update events on a channel, or as Lua callbacks. | |
call a function with buffer as temporary current buffer | |
Clears | |
Creates a buffer-local command | |
Removes an | |
Unmaps a buffer-local | |
Deletes a named mark in the buffer. See | |
Delete a buffer-local user-defined command. | |
Removes a buffer-scoped (b:) variable | |
Deletes the buffer. See | |
Deactivates buffer-update events on the channel. | |
Gets a changed tick of a buffer | |
Gets a map of buffer-local | |
Gets the position (0-indexed) of an | |
Gets | |
Gets a list of buffer-local | |
Gets a line-range from the buffer. | |
Returns a tuple (row,col) representing the position of the named mark. See
| |
Gets the full file name for the buffer | |
Returns the byte offset of a line (0-indexed). | |
Gets a buffer option value | |
Gets a range from the buffer. | |
Gets a buffer-scoped (b:) variable. | |
Checks if a buffer is valid and loaded. See | |
Checks if a buffer is valid. | |
Returns the number of lines in the given buffer. | |
Creates or updates an | |
Sets a buffer-local | |
Sets (replaces) a line-range in the buffer. | |
Sets a named mark in the given buffer, all marks are allowed
file/uppercase, visual, last change, etc. See | |
Sets the full file name for a buffer | |
Sets a buffer option value. Passing | |
Sets (replaces) a range in the buffer | |
Sets a buffer-scoped (b:) variable | |
Calls many API methods atomically. | |
Calls a VimL | |
Calls a VimL function with the given arguments. | |
Send data to channel | |
Clear all autocommands that match the corresponding {opts}. To delete a
particular autocmd, see | |
Executes an Ex command. | |
Executes an Ex command. | |
Create or get an autocommand group | |
Creates an | |
Creates a new, empty, unnamed buffer. | |
Creates a new namespace or gets an existing one. | |
Creates a global | |
Delete an autocommand group by id. | |
Delete an autocommand group by name. | |
Delete an autocommand by id. | |
Deletes the current line. | |
Unmaps a global | |
Deletes an uppercase/file named mark. See | |
Delete a user-defined command. | |
Removes a global (g:) variable. | |
Echo a message. | |
Writes a message to the Vim error buffer. Does not append "\n", the message is buffered (won't display) until a linefeed is written. | |
Writes a message to the Vim error buffer. Appends "\n", so the buffer is flushed (and displayed). | |
Evaluates a VimL | |
Evaluates statusline string. | |
Execute all autocommands for {event} that match the corresponding {opts}
| |
Execute Lua code. Parameters (if any) are available as | |
Executes Vimscript (multiline block of Ex commands), like anonymous
| |
Sends input-keys to Nvim, subject to various quirks controlled by | |
Gets the option information for all options. | |
Returns a 2-tuple (Array), where item 0 is the current channel id and item
1 is the | |
Get all autocommands that match the corresponding {opts}. | |
Gets information about a channel. | |
Returns the 24-bit RGB value of a | |
Returns a map of color names and RGB values. | |
Gets a map of global (non-buffer-local) Ex commands. | |
Gets a map of the current editor state. | |
Gets the current buffer. | |
Gets the current line. | |
Gets the current tabpage. | |
Gets the current window. | |
Gets all or specific highlight groups in a namespace. | |
Gets a highlight group by name | |
Gets a list of global (non-buffer-local) | |
Return a tuple (row, col, buffer, buffername) representing the position of
the uppercase/file named mark. See | |
Gets the current mode. | |
Gets existing, non-anonymous | |
Gets the global value of an option. | |
Gets the option information for one option from arbitrary buffer or window | |
Gets the value of an option. The behavior of this function matches that of
| |
Gets info describing process | |
Gets the immediate children of process | |
Find files in runtime directories | |
Gets a global (g:) variable. | |
Gets a v: variable. | |
Queues raw user-input. Unlike | |
Send mouse event from GUI. | |
Gets the current list of buffer handles | |
Get information about all open channels. | |
Gets the paths contained in 'runtimepath'. | |
Gets the current list of tabpage handles. | |
Gets a list of dictionaries representing attached UIs. | |
Gets the current list of window handles. | |
Sets the current editor state from the given | |
Notify the user with a message | |
Open a terminal instance in a buffer | |
Open a new window. | |
Writes a message to the Vim output buffer. Does not append "\n", the message is buffered (won't display) until a linefeed is written. | |
Parse command line. | |
Parse a VimL expression. | |
Pastes at cursor, in any mode. | |
Puts text at cursor, in any mode. | |
Replaces terminal codes and | |
Selects an item in the completion popup menu. | |
Self-identifies the client. | |
Sets the current buffer. | |
Changes the global working directory. | |
Sets the current line. | |
Sets the current tabpage. | |
Sets the current window. | |
Set or change decoration provider for a | |
Sets a highlight group. | |
Set active namespace for highlights defined with | |
Set active namespace for highlights defined with | |
Sets a global | |
Sets the global value of an option. | |
Sets the value of an option. The behavior of this function matches that of
| |
Sets a global (g:) variable. | |
Sets a v: variable, if it is not readonly. | |
Calculates the number of display cells occupied by | |
Subscribes to event broadcasts. | |
Removes a tab-scoped (t:) variable | |
Gets the tabpage number | |
Gets a tab-scoped (t:) variable | |
Gets the current window in a tabpage | |
Checks if a tabpage is valid | |
Gets the windows in a tabpage | |
Sets a tab-scoped (t:) variable | |
Activates UI events on the channel. | |
Deactivates UI events on the channel. | |
Tells Nvim the geometry of the popupmenu, to align floating windows with an external popup menu. | |
Tells Nvim the number of elements displaying in the popupmenu, to decide
| |
Tells the nvim server if focus was gained or lost by the GUI. | |
TODO: Documentation | |
TODO: Documentation | |
Tell Nvim to resize a grid. Triggers a grid_resize event with the requested grid size or the maximum size if it exceeds size limits. | |
Unsubscribes to event broadcasts. | |
Calls a function with window as temporary current window. | |
Closes the window (like | |
Removes a window-scoped (w:) variable | |
Gets the current buffer in a window | |
Gets window configuration. | |
Gets the (1,0)-indexed, buffer-relative cursor position for a given window
(different windows showing the same buffer have independent cursor
positions). | |
Gets the window height | |
Gets the window number | |
Gets a window option value | |
Gets the window position in display cells. First position is zero. | |
Gets the window tabpage | |
Gets a window-scoped (w:) variable | |
Gets the window width | |
Closes the window and hide the buffer it contains (like | |
Checks if a window is valid | |
Sets the current buffer in a window, without side effects | |
Configures window layout. Currently only for floating and external windows (including changing a split window to those layouts). | |
Sets the (1,0)-indexed cursor position in the window. | |
Sets the window height. | |
Set highlight namespace for a window. This will use highlights defined
with | |
Sets a window option value. Passing | |
Sets a window-scoped (w:) variable | |
Sets the window width. This will only succeed if the screen is split vertically. | |
Returns the single letter name of the last recorded register.
Returns an empty string when nothing was recorded yet.
See | |
Sends {event} to {channel} via | |
Sends a request to {channel} to invoke {method} via
| |
Deprecated. Replace | |
Opens a socket or named pipe at {address} and listens for
| |
Closes the pipe or socket at {address}.
Returns TRUE if {address} is valid, else FALSE.
If | |
Connect a socket to an address. If {mode} is "pipe" then {address} should be the path of a local domain socket (on unix) or named pipe (on Windows). If {mode} is "tcp" then {address} should be of the form "host:port" where the host should be an ip adderess or host name, and port the port number. | |
With | |
Returns | |
Spawns {cmd} in a new pseudo-terminal session connected
to the current (unmodified) buffer. Parameters and behavior
are the same as | |
f wait | Waits until {condition} evaluates to |