Giter VIP home page Giter VIP logo

nvim-plugin-template's Introduction

A Neovim Plugin Template

GitHub Workflow Status Lua

A template repository for Neovim plugins.

Using it

Via gh:

$ gh repo create my-plugin -p ellisonleao/nvim-plugin-template

Via github web page:

Click on Use this template

Features and structure

  • 100% Lua
  • Github actions for:
    • running tests using plenary.nvim and busted
    • check for formatting errors (Stylua)
    • vimdocs autogeneration from README.md file
    • luarocks release (LUAROCKS_API_KEY secret configuration required)

Plugin structure

.
├── lua
│   ├── plugin_name
│   │   └── module.lua
│   └── plugin_name.lua
├── Makefile
├── plugin
│   └── plugin_name.lua
├── README.md
├── tests
│   ├── minimal_init.lua
│   └── plugin_name
│       └── plugin_name_spec.lua

nvim-plugin-template's People

Contributors

ellisonleao avatar github-actions[bot] avatar mikesmithgh avatar vinibispo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nvim-plugin-template's Issues

feature: use pull request on for doc update instead of directly committing.

Did you check the docs?

  • I have read all the docs

Is your feature request related to a problem? Please describe.

Why?

  • Adding permission to create a pull request is easy
  • Bot directly committing to main doesn't sound good
  • It's better to review before merging

Describe the solution you'd like

This is what I'm using to create a pull request to update the vimdoc

on:
  push:
    branches:
      - main

name: docs

permissions:
  pull-requests: write
  contents: write

jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: panvimdoc
        uses: kdheepak/panvimdoc@main
        with:
          vimdoc: "<name>"
          dedupsubheadings: false
          version: "Neovim >= 0.9.4"
          demojify: true

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v5
        with:
          base: "main"

Describe alternatives you've considered

.

Additional context

No response

bug: `docs/Push changes` failed because permission denied

Did you check docs and existing issues?

  • I have read all the plugin docs
  • I have searched the existing issues
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

None

Operating system/version

None

Describe the bug

Thanks you for your work.

I create a plugin from you template, and push a commit to github, then the github action run failed.

https://github.com/AbaoFromCUG/rust-tools.nvim/actions/runs/5714642024/job/15482648839

What should I set in my repository?

Steps To Reproduce

None

Expected Behavior

Work right

Document how to let the lua LSP find local libraries, such as plenary

This template is great, it saved a lot of time.

There is just one thing I don't understand, which is how to make lua_ls (language server for lua) understand where to find the code for plenary. By default plenary is put into /tmp.

I tried to create a .luarc.json to find it but I failed:

{
  "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
  "diagnostics.globals": ["describe", "it"],
  "workspace.library": ["?.lua", "?/init.lua", "/tmp/plenary.nvim/lua/plenary/?.lua"]
}

Since the docs of plenary are so limited and the LSP doesn't know anything about the available methods and imports of plenary, it's quite hard to develop locally.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.