GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nvim-lua/nvim-lua-plugin-template: A starter template for a Neovim plugin written in Lua

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
spec
spec
 
 
.busted
.busted
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.luacheckrc
.luacheckrc
 
 
README.md
README.md
 
 
nvim-lua-plugin-scm-1.rockspec
nvim-lua-plugin-scm-1.rockspec
 
 

Repository files navigation

nvim-lua-plugin-template

This repository is a template for Neovim plugins written in Lua.

The intention is that you use this template to create a new repository where you then adapt this readme and add your plugin code. The template includes the following:

  • GitHub workflows and configurations to run linters and tests
  • Packaging of tagged releases and upload to LuaRocks if a LUAROCKS_API_KEY is added to the GitHub Actions secrets
  • Minimal test setup:
    • A scm rockspec, nvim-lua-plugin-scm-1.rockspec
    • A .busted file
  • EditorConfig
  • A .luacheckrc

To get started writing a Lua plugin, I recommend reading :help lua-guide and :help write-plugin.

Scope

Anything that the majority of plugin authors will want to have is in scope of this starter template. Anything that is controversial is out-of-scope.

Usage

  • Click Use this template. Do not fork.
  • Rename nvim-lua-plugin-scm-1.rockspec and change the package name to the name of your plugin.

Template License

The template itself is licensed under the MIT license. The template doesn't include a LICENSE file. You should add one after creating your repository.


The remainder of the README is text that can be preserved in your plugin:


Development

Run tests

Running tests requires either

  • luarocks
  • or busted and nlua

to be installed1.

You can then run:

luarocks test --local
# or
busted

Or if you want to run a single test file:

luarocks test spec/path_to_file.lua --local
# or
busted spec/path_to_file.lua

If you see an error like module 'busted.runner' not found:

eval $(luarocks path --no-bin)

For this to work you need to have Lua 5.1 set as your default version for luarocks. If that's not the case you can pass --lua-version 5.1 to all the luarocks commands above.

Footnotes

  1. The test suite assumes that nlua has been installed using luarocks into ~/.luarocks/bin/. ↩

About

A starter template for a Neovim plugin written in Lua

Resources

Readme
Activity
Custom properties

Stars

179 stars

Watchers

5 watching

Forks

17 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.