tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
vimPlugins.aider-nvim: fix patch
Austin Horstman
1 year ago
4054973b
e01fd31f
+19
-33
3 changed files
expand all
collapse all
unified
split
pkgs
applications
editors
vim
plugins
overrides.nix
patches
aider-nvim
bin.patch
aider.nvim
fix-paths.patch
+4
-7
pkgs/applications/editors/vim/plugins/overrides.nix
···
10
fetchpatch,
11
fetchurl,
12
neovimUtils,
0
13
substituteAll,
14
# Language dependencies
15
fetchYarnDeps,
···
2593
};
2594
2595
aider-nvim = super.aider-nvim.overrideAttrs {
2596
-
patches = [ ./patches/aider.nvim/fix-paths.patch ];
2597
-
2598
-
postPatch = ''
2599
-
substituteInPlace lua/aider.lua --replace-fail '@aider@' ${aider-chat}/bin/aider
2600
-
substituteInPlace lua/helpers.lua --replace-fail '@aider@' ${aider-chat}/bin/aider
2601
-
'';
2602
-
nvimRequireCheck = "aider";
2603
};
2604
2605
refactoring-nvim = super.refactoring-nvim.overrideAttrs {
···
10
fetchpatch,
11
fetchurl,
12
neovimUtils,
13
+
replaceVars,
14
substituteAll,
15
# Language dependencies
16
fetchYarnDeps,
···
2594
};
2595
2596
aider-nvim = super.aider-nvim.overrideAttrs {
2597
+
patches = [
2598
+
(replaceVars ./patches/aider-nvim/bin.patch { aider = lib.getExe' aider-chat "aider"; })
2599
+
];
0
0
0
0
2600
};
2601
2602
refactoring-nvim = super.refactoring-nvim.overrideAttrs {
+15
pkgs/applications/editors/vim/plugins/patches/aider-nvim/bin.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
diff --git a/lua/aider.lua b/lua/aider.lua
2
+
index 98b5071..589b06d 100644
3
+
--- a/lua/aider.lua
4
+
+++ b/lua/aider.lua
5
+
@@ -61,9 +61,9 @@ function M.AiderOpen(args, window_type)
6
+
log("Existing aider buffer found, opening in new window")
7
+
helpers.open_buffer_in_new_window(window_type, M.aider_buf)
8
+
else
9
+
log("No existing aider buffer, creating new one")
10
+
- local command = "aider " .. (args or "")
11
+
+ local command = "@aider@ " .. (args or "")
12
+
log("Opening window with type: " .. window_type)
13
+
helpers.open_window(window_type)
14
+
log("Adding buffers to command")
15
+
command = helpers.add_buffers_to_command(command, is_valid_buffer)
-26
pkgs/applications/editors/vim/plugins/patches/aider.nvim/fix-paths.patch
···
1
-
diff --git a/lua/aider.lua b/lua/aider.lua
2
-
index 38db0d1..d1ad6d5 100644
3
-
--- a/lua/aider.lua
4
-
+++ b/lua/aider.lua
5
-
@@ -26,7 +26,7 @@ function M.AiderOpen(args, window_type)
6
-
if M.aider_buf and vim.api.nvim_buf_is_valid(M.aider_buf) then
7
-
helpers.open_buffer_in_new_window(window_type, M.aider_buf)
8
-
else
9
-
- command = 'aider ' .. (args or '')
10
-
+ command = '@aider@ ' .. (args or '')
11
-
helpers.open_window(window_type)
12
-
command = helpers.add_buffers_to_command(command)
13
-
M.aider_job_id = vim.fn.termopen(command, {on_exit = OnExit})
14
-
diff --git a/lua/helpers.lua b/lua/helpers.lua
15
-
index 152182b..aa21584 100644
16
-
--- a/lua/helpers.lua
17
-
+++ b/lua/helpers.lua
18
-
@@ -63,7 +63,7 @@ end
19
-
20
-
local function build_background_command(args, prompt)
21
-
prompt = prompt or "Complete as many todo items as you can and remove the comment for any item you complete."
22
-
- local command = 'aider --msg "' .. prompt .. '" ' .. (args or '')
23
-
+ local command = '@aider@ --msg "' .. prompt .. '" ' .. (args or '')
24
-
command = add_buffers_to_command(command)
25
-
return command
26
-
end
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0