Skip to content

Commit 4c69a43

Browse files
ttak0422claude
andcommitted
feat: add nix app for testing pterm in isolated neovim
Add `nix run .#test-nvim` app that launches Neovim with pterm pre-loaded for quick manual verification without manual setup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 24c3ac8 commit 4c69a43

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

flake.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@
9494
};
9595
};
9696

97+
apps = import ./nix/apps {
98+
inherit self' pkgs;
99+
};
100+
97101
packages = {
98102
default = pterm;
99103
inherit pterm pterm-daemon;
@@ -105,4 +109,4 @@
105109
};
106110
};
107111
};
108-
}
112+
}

nix/apps/default.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
self',
3+
pkgs,
4+
...
5+
}:
6+
7+
let
8+
mkNeovimApp = cfg: {
9+
type = "app";
10+
program = "${
11+
with pkgs; wrapNeovimUnstable neovim-unwrapped (neovimUtils.makeNeovimConfig cfg)
12+
}/bin/nvim";
13+
};
14+
readLua = path: ''
15+
lua << EOF
16+
${builtins.readFile path}
17+
EOF
18+
'';
19+
in
20+
{
21+
test-nvim = mkNeovimApp {
22+
plugins = [
23+
{
24+
plugin = self'.packages.pterm;
25+
config = readLua ./nvim/pterm.lua;
26+
}
27+
];
28+
};
29+
}

nix/apps/nvim/pterm.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require("pterm").setup({})

0 commit comments

Comments
 (0)