Skip to content

Commit cbd87d8

Browse files
committed
ci: add luarc-stable checks
1 parent 2d680e3 commit cbd87d8

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

flake.nix

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,31 @@
6666
];
6767
};
6868

69-
luarc = pkgs.mk-luarc {
70-
nvim = pkgs.neovim-nightly;
71-
plugins = with pkgs.luajitPackages; [
72-
inputs.rocks-nvim-flake.packages.${pkgs.system}.rocks-nvim
73-
nvim-nio
74-
];
75-
disabled-diagnostics = [
76-
# caused by a nio luaCATS bug
77-
"redundant-return-value"
78-
];
79-
};
69+
mk-luarc = nvim:
70+
pkgs.mk-luarc {
71+
nvim = pkgs.neovim-nightly;
72+
plugins = with pkgs.luajitPackages; [
73+
inputs.rocks-nvim-flake.packages.${pkgs.system}.rocks-nvim
74+
nvim-nio
75+
];
76+
};
8077

81-
type-check-nightly = pre-commit-hooks.lib.${system}.run {
82-
src = self;
83-
hooks = {
84-
lua-ls = {
85-
enable = true;
86-
settings.configuration = luarc;
78+
luarc-nightly = mk-luarc pkgs.neovim-nightly;
79+
luarc-stable = mk-luarc pkgs.neovim-unwrapped;
80+
81+
mk-typecheck = luarc:
82+
pre-commit-hooks.lib.${system}.run {
83+
src = self;
84+
hooks = {
85+
lua-ls = {
86+
enable = true;
87+
settings.configuration = luarc;
88+
};
8789
};
8890
};
89-
};
91+
92+
type-check-nightly = mk-typecheck luarc-nightly;
93+
type-check-stable = mk-typecheck luarc-stable;
9094

9195
pre-commit-check = pre-commit-hooks.lib.${system}.run {
9296
src = self;
@@ -102,7 +106,7 @@
102106
name = "rocks-git.nvim devShell";
103107
shellHook = ''
104108
${pre-commit-check.shellHook}
105-
ln -fs ${pkgs.luarc-to-json luarc} .luarc.json
109+
ln -fs ${pkgs.luarc-to-json luarc-nightly} .luarc.json
106110
'';
107111
buildInputs =
108112
self.checks.${system}.pre-commit-check.enabledPackages
@@ -133,6 +137,7 @@
133137
inherit
134138
pre-commit-check
135139
type-check-nightly
140+
type-check-stable
136141
;
137142
inherit (pkgs) integration-nightly;
138143
};

0 commit comments

Comments
 (0)