Skip to content
This repository was archived by the owner on Sep 5, 2026. It is now read-only.

ci: add lua-language-server type-check (non-blocking) - #11

Merged
hypatia-tile merged 1 commit into
mainfrom
feat/ci-luals-typecheck
Jul 25, 2026
Merged

hypatia-tile merged 1 commit into
mainfrom
feat/ci-luals-typecheck

Conversation

@hypatia-tile

Copy link
Copy Markdown
Owner

Adds a typecheck CI job running lua-language-server --check over the Lua
sources, the deferred item from the keymap-util pass.

lazydev parity in CI

lazydev only supplies LuaLS type libraries inside Neovim. The job
reproduces that for standalone LuaLS:

  1. Install Neovim (stable) + Deno, restore plugins into the nvim-dev data
    dir (shared cache key with check).
  2. Inject workspace.library = $VIMRUNTIME + the installed plugin lua
    dirs into a committed base (.github/luarc.ci.json), written as the
    effective .luarc.json (LuaLS can't expand env vars, so paths are
    resolved at run time). The repo's own .luarc.json (editor/lazydev) is
    left untouched.
  3. lua-language-server --check . — exits non-zero on problems (this version
    writes no check.json, so the exit code is the signal). Pinned to 3.18.2.

Settings

  • checklevel: Warning.
  • undefined-field disabled: every current finding (23, all in
    LuaSnip-related files) was a false positive from LuaSnip's incomplete field
    annotations (ls.text_node, …). The useful diagnostics — type mismatches,
    undefined-global, missing-parameter, etc. — stay on. Open to re-enabling
    later with per-plugin typing.

Rollout

The job is not in branch protection yet (informative, can go red without
blocking merges). Promote it to a required check once trusted.

Verification

Reproduced locally with LuaLS 3.18.2-dev + the same library injection:
0 problems, exit 0. Before disabling undefined-field: 23 problems in 6
files, all LuaSnip interop.

🤖 Generated with Claude Code

Add a `typecheck` job that runs `lua-language-server --check` over the Lua
sources. lazydev only supplies type libraries inside Neovim, so the job
reproduces that parity for standalone LuaLS: it restores plugins into the
nvim-dev data dir (shared cache with `check`), then injects
`workspace.library` = $VIMRUNTIME + the installed plugin `lua` dirs into a
committed base config (.github/luarc.ci.json) written as the effective
.luarc.json. `--check` exits non-zero on problems, so the exit code is the
signal (this LuaLS version writes no check.json).

checklevel is Warning. `undefined-field` is disabled for now: every current
finding was a false positive from LuaSnip's incomplete field annotations
(ls.text_node, etc.); the useful diagnostics (type mismatches,
undefined-global, missing-parameter) stay on.

The job is intentionally NOT in branch protection yet — informative while it
stabilizes, to be promoted to a required check once trusted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hypatia-tile
hypatia-tile merged commit 81d3e13 into main Jul 25, 2026
3 checks passed
@hypatia-tile
hypatia-tile deleted the feat/ci-luals-typecheck branch July 25, 2026 12:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant