Files
eleith e6664e4bf1 Pin the toolchain and replace luacheck with lua-language-server
mise.toml pins Neovim 0.12.1, Lua 5.5.1, stylua 2.5.2 and
lua-language-server 3.19.1, matching the CI image
nvim:0.12.1-luals3.19.1-stylua2.5.2 from git.eleith.com/eleith/containers.
Bump both together.

luacheck's last release (v1.2.0, May 2024) crashes on Lua 5.5, and the
fix has sat unreleased on master alongside 16 other commits. Every
install is also tied to one Lua interpreter. lua-language-server is
already in the toolchain for type checking, releases monthly, and
covers what .luacheckrc checked once severities are raised.

- make lint runs lua-language-server over lua/ and tests/, replacing
  both luacheck and the separate types target.
- .luarc.json raises unused-local, unused-function, redefined-local,
  lowercase-global and unreachable-code to Warning so they fail the
  build, and adds lua/ to runtime.path so tests' requires resolve and
  are type-checked across files.
- Deliberate test fakes of vim.ui and export.copy are marked with
  ---@diagnostic disable-next-line: duplicate-set-field.

Fixes a gate that could never fail: the old types target piped
lua-language-server into tail, so make reported tail's exit status,
always 0. Output now goes to a file and the real status is kept.

Known gap: lua-language-server only detects unreachable code after an
infinite loop, not after error(), do-return, goto, or if false
(LuaLS/lua-language-server#2767).

These land together because each depends on the other: the new lint
target needs the pinned lua-language-server and stylua, and with the old
luacheck target the build cannot pass on Lua 5.5.
2026-09-21 11:23:51 -07:00

8 lines
214 B
TOML

# Pinned to match the CI image, nvim:0.12.1-luals3.19.1-stylua2.5.2
# (git.eleith.com/eleith/containers). Bump both together.
[tools]
neovim = "0.12.1"
lua = "5.5.1"
stylua = "2.5.2"
lua-language-server = "3.19.1"