Skip to content

Template for writing plugins for Neovim in Lua and Rust

License

Notifications You must be signed in to change notification settings

Saghen/neovim-lua-rust-template

Repository files navigation

Neovim Lua Rust Template

A template for creating Neovim plugins in Lua with an accompanying Rust library.

Getting Started

Ensure you have lazydev.nvim installed if you're missing autocompletion in Lua files. Rename all instances of your-plugin to the name of your plugin.

mv lua/your-plugin lua/new-name

rg -l 'your-plugin' | xargs sed -i 's/your-plugin/new-name/g'
rg -l 'your_plugin' | xargs sed -i 's/your_plugin/new_name/g'

rg -l 'your-username' | xargs sed -i 's/your-username/new-username/g'

Installation

Development

{
  'your-username/your-plugin',

  -- see lazy.nvim docs (`config.dev`): https://lazy.folke.io/configuration
  dev = true,

  -- optional, see `lua/your-plugin/init.lua`
  dependencies = 'saghen/blink.download',

  build = 'cargo build --release',
  opts = {}
}

Stable

{
  'your-username/your-plugin',
  version = '*', -- only required with prebuilt binaries

  -- optional, see `lua/your-plugin/init.lua`
  -- download prebuilt binaries, from github releases, and setup `cpath`
  dependencies = 'saghen/blink.download',
  -- OR build from source
  build = 'cargo build --release',

  opts = {}
}

About

Template for writing plugins for Neovim in Lua and Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published