Skip to content

airRnot1106/nvim-plugin-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvim-plugin-template

A template repository for building Neovim plugins with Lua, featuring a complete development environment powered by Nix.

demo

Features

  • Plugin scaffold with setup() and a sample user command (:SampleHello)
  • Testing with Plenary + Busted
  • Reproducible development environment via Nix flakes
  • Code formatting with treefmt (stylua, oxfmt, nixfmt)
  • Linting with selene
  • Automated git hooks (formatting, linting, secret detection, GitHub Actions security checks)
  • Demo recording with VHS

Requirements

Getting Started

  1. Click Use this template on GitHub to create your repository
  2. Rename sample to your plugin name throughout the codebase:
    • lua/sample/lua/<your-plugin>/
    • tests/sample/tests/<your-plugin>/
    • pname = "sample" in flake.nix
  3. Enable the development environment:
    direnv allow

Development

# Enter the development shell
nix develop

# Run tests
nix flake check

# Format all files
nix fmt

# Launch Neovim with the plugin loaded
nix run .#nvim

# Record a demo
nix run .#vhs

About

A template repository for building Neovim plugins

Topics

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages