Module nvim_utils::vim

source ·
Available on crate feature vim only.
Expand description

Semi-direct mapping of the vim module in Neovim’s lua api

The goal for this module is to provide an idiomatic way to call Neovim’s lua api from Rust, without needing to repeat the boilerplate for loading specific functions.

Notable differences from the lua api:

  • vim.fn has been renamed to vim::func, since fn is a keyword in Rust
  • Added vim::ext for functions that don’t directly map to the Neovim api but make use of it or extend it
  • Not all functions are implemented yet

Modules

  • Utilities that don’t directly map to the Neovim API but make use of it or extend it
  • Corresponds to vim.fn
  • Corresponds to vim.keymap
  • Corresponds to vim.log

Functions

  • Corresponds to vim.cmd()
  • Get global vim
  • Corresponds to vim.inspect()
  • Corresponds to vim.notify()