https://github.com/stevearc/nvim-typecheck-action
Github action for typechecking a neovim plugin
https://github.com/stevearc/nvim-typecheck-action
Last synced: 3 months ago
JSON representation
Github action for typechecking a neovim plugin
- Host: GitHub
- URL: https://github.com/stevearc/nvim-typecheck-action
- Owner: stevearc
- License: mit
- Created: 2023-08-13T05:09:59.000Z (over 1 year ago)
- Default Branch: v2
- Last Pushed: 2024-08-16T22:04:41.000Z (6 months ago)
- Last Synced: 2024-08-16T23:21:53.446Z (6 months ago)
- Language: Lua
- Size: 14.6 KB
- Stars: 17
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nvim-typecheck-action
Github action for typechecking a neovim plugin
If you are using the [type annotations from LuaLS](https://luals.github.io/wiki/annotations/), this action will typecheck your plugin.
## Usage
Create the file `.github/workflows/typecheck.yml` with the following contents:
```yaml
---
name: Type check
on:
pull_request: ~
push:
branches:
- masterjobs:
build:
name: Type check
runs-on: ubuntu-lateststeps:
- 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
```yaml
- 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`
```yaml
- uses: stevearc/nvim-typecheck-action@v2
with:
level: Error
```### `configpath`
Path to a [`luarc.json`](https://luals.github.io/wiki/configuration/) file
```yaml
- 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.```yaml
- 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.
```yaml
- 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.
```yaml
- uses: stevearc/nvim-typecheck-action@v2
with:
luals-version: 3.9.1
```