diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 0122b93..3f5fb99 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -24,6 +24,35 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} args: . + llscheck: + name: llscheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Task + uses: arduino/setup-task@v1 + with: + version: 3.x + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install NeoVim + uses: rhysd/action-setup-vim@v1 + with: + neovim: true + version: stable + + - uses: leafo/gh-actions-lua@v12 + - uses: leafo/gh-actions-luarocks@v4 + + - name: Install llscheck + run: | + luarocks install lua-language-server + luarocks install llscheck + + - name: llscheck + run: task llscheck + docs: name: Docs runs-on: ubuntu-latest diff --git a/.github/workflows/luarc.json b/.github/workflows/luarc.json new file mode 100644 index 0000000..dd74038 --- /dev/null +++ b/.github/workflows/luarc.json @@ -0,0 +1,13 @@ +{ + "diagnostics.libraryFiles": "Disable", + "runtime.version": "LuaJIT", + "workspace.checkThirdParty": "Disable", + "workspace.library": [ + "$VIMRUNTIME/lua", + "lua", + ".tests/site/pack/deps/start/mini.doc/lua", + ".tests/site/pack/deps/start/mini.test/lua", + ".tests/site/pack/deps/start/nvim-treesitter/lua", + ".tests/site/pack/deps/start/tokyonight.nvim/lua" + ] +} diff --git a/Taskfile.yml b/Taskfile.yml index 2905634..f05a195 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -21,8 +21,13 @@ tasks: -u ./scripts/minimal_init.lua \ -c "lua MiniTest.run()" \ -c ":qa!" - nvim: - cmd: nvim --clean -u "./scripts/minimal_init.lua" {{ .CLI_ARGS }} + + llscheck: + desc: run type checking + cmd: | + VIMRUNTIME="`nvim --clean --headless +'lua io.write(vim.env.VIMRUNTIME)' +q`" \ + llscheck --configpath=.github/workflows/luarc.json\ + --checklevel Error docgen: desc: generate vimhelp