pub struct Api<'lua> { /* private fields */ }Expand description
vim.api.*
Neovim doc
Implementations
sourceimpl<'lua> Api<'lua>
impl<'lua> Api<'lua>
sourcepub fn nvim__get_runtime(
&self,
pat: &[&str],
all: bool,
opts: NvimGetRuntimeOpts
) -> LuaValue<'_>
pub fn nvim__get_runtime(
&self,
pat: &[&str],
all: bool,
opts: NvimGetRuntimeOpts
) -> LuaValue<'_>
sourcepub fn nvim_buf_create_user_command(
&self,
buffer: Index,
name: String,
command: Command<'_>,
opts: NvimCreateUserCommandOpts
)
pub fn nvim_buf_create_user_command(
&self,
buffer: Index,
name: String,
command: Command<'_>,
opts: NvimCreateUserCommandOpts
)
sourcepub fn nvim_create_autocmd(
&self,
events: Vec<String>,
opts: NvimCreateAutocmdsOpts<'_>
) -> i64
pub fn nvim_create_autocmd(
&self,
events: Vec<String>,
opts: NvimCreateAutocmdsOpts<'_>
) -> i64
Create an autocommand
The API allows for two (mutually exclusive) types of actions to be executed when the autocommand triggers: a callback function (Lua or Vimscript), or a command (like regular autocommands).
sourcepub fn nvim_get_autocmds(&self, opts: NvimGetAutocmdsOpts) -> Vec<AutoCmd>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn nvim_get_autocmds(&self, opts: NvimGetAutocmdsOpts) -> Vec<AutoCmd>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Get all autocommands that match the corresponding opts.
sourcepub fn nvim_get_runtime_file(&self, glob: &str, all: bool) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn nvim_get_runtime_file(&self, glob: &str, all: bool) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Find files in runtime direcories
sourcepub fn nvim_set_keymap(
&self,
mode: Mode,
lhs: &str,
rhs: &str,
opts: NvimSetKeymapOpts<'_>
)
pub fn nvim_set_keymap(
&self,
mode: Mode,
lhs: &str,
rhs: &str,
opts: NvimSetKeymapOpts<'_>
)
Trait Implementations
Auto Trait Implementations
impl<'lua> !RefUnwindSafe for Api<'lua>
impl<'lua> !Send for Api<'lua>
impl<'lua> !Sync for Api<'lua>
impl<'lua> Unpin for Api<'lua>
impl<'lua> !UnwindSafe for Api<'lua>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'lua, T> FromLuaMulti<'lua> for T where
T: FromLua<'lua>,
impl<'lua, T> FromLuaMulti<'lua> for T where
T: FromLua<'lua>,
sourcefn from_lua_multi(values: MultiValue<'lua>, lua: &'lua Lua) -> Result<T, Error>
fn from_lua_multi(values: MultiValue<'lua>, lua: &'lua Lua) -> Result<T, Error>
Performs the conversion. Read more