Skip to content

stevearc/nvim-typecheck-action

Repository files navigation

nvim-typecheck-action

Github action for typechecking a neovim plugin

If you are using the type annotations from LuaLS, this action will typecheck your plugin.

Usage

Create the file .github/workflows/typecheck.yml with the following contents:

---
name: Type check
on:
  pull_request: ~
  push:
    branches:
      - master

jobs:
  build:
    name: Type check
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - uses: stevearc/nvim-typecheck-action@v2

Inputs

The following optional inputs can be specified using with:

path

The path to typecheck

- uses: stevearc/nvim-typecheck-action@v2
  with:
    path: lua

level

The minimum level of diagnostic that should be logged. One of Error, Warning, or Information

- uses: stevearc/nvim-typecheck-action@v2
  with:
    level: Error

configpath

Path to a luarc.json file

- uses: stevearc/nvim-typecheck-action@v2
  with:
    configpath: ".luarc.json"

libraries

Space-separated list of github repos to add to the library path. Use this if your plugin depends on types that are declared in another plugin.

- uses: stevearc/nvim-typecheck-action@v2
  with:
    libraries: |
      https://github.com/nvim-neotest/neotest

nvim-version

Which version of Neovim to use to run the check.

- uses: stevearc/nvim-typecheck-action@v2
  with:
    nvim-version: v0.10.0

luals-version

Which version of lua-language-server to use to run the check.

- uses: stevearc/nvim-typecheck-action@v2
  with:
    luals-version: 3.9.1

About

Github action for typechecking a neovim plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published