Skip to content

Commit 26d2922

Browse files
committed
better sandboxed vim ai plugin
1 parent 8513635 commit 26d2922

File tree

4 files changed

+35
-6
lines changed

4 files changed

+35
-6
lines changed

nix/sources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@
6565
"homepage": "",
6666
"owner": "NixOS",
6767
"repo": "nixpkgs",
68-
"rev": "32f313e49e42f715491e1ea7b306a87c16fe0388",
69-
"sha256": "1z4ga87qla5300qwib3dnjnkaywwh8y1qqsb8w2mrsrw78k9xmlw",
68+
"rev": "647e5c14cbd5067f44ac86b74f014962df460840",
69+
"sha256": "0m30xfi18dgxi5lx9zgqpq1kxwdwrdg9wdbzzgs8cicmsvq6ami5",
7070
"type": "tarball",
71-
"url": "https://github.com/NixOS/nixpkgs/archive/32f313e49e42f715491e1ea7b306a87c16fe0388.tar.gz",
71+
"url": "https://github.com/NixOS/nixpkgs/archive/647e5c14cbd5067f44ac86b74f014962df460840.tar.gz",
7272
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
7373
}
7474
}

nix/vibe.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
name = "vibe";
99
text = "alacritty";
1010
runtimeInputs = with pkgs; [
11-
(import ./../pub/vi/nix/default.nix {ai = false;})
11+
(import ./../pub/vi/nix/default.nix {ai = true;})
1212
fontconfig
1313
busybox
1414
curl

pub/vi/nix/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ in
4949
cp -R ./ $out/
5050
'';
5151
};
52-
vi = neovim.override {
52+
vi = unst.neovim.override {
5353
viAlias = true;
5454
vimAlias = true;
5555
configure = {
@@ -108,7 +108,7 @@ in
108108
]
109109
++ (
110110
if ai
111-
then [unst.vimPlugins.avante-nvim]
111+
then [unst.vimPlugins.minuet-ai-nvim]
112112
else []
113113
);
114114
opt = [

pub/vi/vimrc.lua

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,32 @@ if ok then
33
avante_lib.load()
44
require("avante").setup({provider = "gemini"})
55
end
6+
7+
local ok, minuet = pcall(require, "minuet")
8+
if ok then
9+
minuet.setup({
10+
provider = "gemini",
11+
provider_options = {
12+
gemini = {
13+
model = 'gemini-2.0-flash-lite'
14+
}
15+
},
16+
virtualtext = {
17+
auto_trigger_ft = {},
18+
keymap = {
19+
-- accept whole completion
20+
accept = '<M-y>',
21+
-- accept one line
22+
accept_line = '<M-l>',
23+
-- accept n lines (prompts for number)
24+
-- e.g. "A-z 2 CR" will accept 2 lines
25+
accept_n_lines = '<M-z>',
26+
-- Cycle to prev completion item, or manually invoke completion
27+
prev = '<M-p>',
28+
-- Cycle to next completion item, or manually invoke completion
29+
next = '<M-n>',
30+
dismiss = '<M-e>',
31+
},
32+
}
33+
})
34+
end

0 commit comments

Comments
 (0)