Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Nix-based CI checks for Lua formatting and Lua Language Server type checking, and wires them into GitHub Actions via nix flake check.
Changes:
- Extend
flake.nixwithchecksforlua-language-server --checkandstylua --check, and include required tools in the devShell. - Add a repository
.stylua.tomlconfiguration and run the checks in CI (nix flake check). - Minor Lua formatting adjustment in
lua/zen/init.lua.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
lua/zen/init.lua |
Formatting-only change to match style/formatter output. |
flake.nix |
Adds Nix flake checks for Lua type-checking and Stylua formatting; updates devShell packages. |
.stylua.toml |
Introduces Stylua configuration used by the new formatting check. |
.github/workflows/test.yml |
Adds a nix-checks job to run nix flake check in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| luarc = pkgs.mk-luarc { | ||
| plugins = with pkgs.vimPlugins; [ | ||
| mini-nvim | ||
| ]; | ||
| }; | ||
| luarc-json = pkgs.luarc-to-json ( | ||
| luarc | ||
| // { | ||
| diagnostics = luarc.diagnostics // { | ||
| globals = [ "MiniTest" ]; | ||
| }; | ||
| } | ||
| ); | ||
| type-check = | ||
| pkgs.runCommand "type-check" | ||
| { | ||
| nativeBuildInputs = [ pkgs.lua-language-server ]; | ||
| } | ||
| '' | ||
| export HOME="$(mktemp -d)" | ||
| cp -r ${self} source | ||
| cd source | ||
| lua-language-server --configpath ${luarc-json} --logpath "$HOME/log" --check . | ||
| touch $out | ||
| ''; | ||
| stylua-check = | ||
| pkgs.runCommand "stylua-check" | ||
| { | ||
| nativeBuildInputs = [ pkgs.stylua ]; | ||
| } | ||
| '' | ||
| cd ${self} | ||
| stylua --check . | ||
| touch $out | ||
| ''; | ||
| in | ||
| { | ||
| devShells.default = pkgs.mkShell { | ||
| packages = with pkgs; [ |
There was a problem hiding this comment.
The devShell previously ensured the repo had an up-to-date .luarc.json (via a shellHook symlink). After switching to mk-luarc/luarc-to-json, the shellHook is removed, but the repo still contains a committed .luarc.json that doesn’t match the config used by the new type-check (which includes plugin libs). This can lead to inconsistent Lua LS diagnostics between local development and nix flake check. Consider either restoring a devShell step to expose the generated JSON at .luarc.json or updating/removing the committed .luarc.json so local and CI use the same config source.
No description provided.