Skip to content

Commit 29a8b53

Browse files
committed
feat: standalone nixvim leetcode.nvim
1 parent 402943a commit 29a8b53

File tree

4 files changed

+387
-2
lines changed

4 files changed

+387
-2
lines changed

flake.lock

Lines changed: 261 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,40 @@
44
inputs = {
55
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
66
flake-utils.url = "github:numtide/flake-utils";
7+
nixvim.url = "github:nix-community/nixvim";
78
};
89

9-
outputs = { self, nixpkgs, flake-utils }:
10+
outputs = { self, nixpkgs, flake-utils, nixvim }:
1011
with flake-utils.lib;
1112
eachDefaultSystem (system:
1213
let
1314
pkgs = import nixpkgs {
1415
inherit system;
1516
};
17+
nixvimLib = nixvim.lib.${system};
18+
nixvim' = nixvim.legacyPackages.${system};
19+
nixvimModule = {
20+
inherit pkgs;
21+
module = import ./leetcode.nix; # import the module directly
22+
# You can use `extraSpecialArgs` to pass additional arguments to your module files
23+
# extraSpecialArgs = { };
24+
};
25+
nvim = nixvim'.makeNixvimWithModule
26+
nixvimModule;
1627
in
1728
{
1829
devShells.default = pkgs.mkShell {
1930
buildInputs = with pkgs;[ stylua ];
2031
};
32+
checks = {
33+
# Run `nix flake check .` to verify that your config is not broken
34+
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
35+
};
36+
37+
packages = {
38+
# Lets you run `nix run .` to start nixvim
39+
default = nvim;
40+
};
2141
}
2242
);
2343
}

0 commit comments

Comments
 (0)