mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 18:23:44 +00:00
vimPlugins.aider-nvim: init at 2023-10-22
This commit is contained in:
parent
b4a4679372
commit
fc1402425f
@ -605,6 +605,18 @@ final: prev:
|
||||
meta.homepage = "https://github.com/aduros/ai.vim/";
|
||||
};
|
||||
|
||||
aider-nvim = buildVimPlugin {
|
||||
pname = "aider.nvim";
|
||||
version = "2023-10-22";
|
||||
src = fetchFromGitHub {
|
||||
owner = "joshuavial";
|
||||
repo = "aider.nvim";
|
||||
rev = "74a01227271d0ea211f2edafa82028b22d4c2022";
|
||||
sha256 = "jkco90IF948LuRILP3Bog3GelUGOQzsEw2jP4f9Ghbw=";
|
||||
};
|
||||
meta.homepage = "https://github.com/joshuavial/aider.nvim/";
|
||||
};
|
||||
|
||||
alchemist-vim = buildVimPlugin {
|
||||
pname = "alchemist.vim";
|
||||
version = "2023-09-01";
|
||||
|
@ -131,6 +131,7 @@
|
||||
hurl
|
||||
, # must be lua51Packages
|
||||
luajitPackages
|
||||
, aider-chat
|
||||
,
|
||||
}: self: super:
|
||||
let
|
||||
@ -1495,6 +1496,15 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
aider-nvim = super.aider-nvim.overrideAttrs {
|
||||
patches = [ ./patches/aider.nvim/fix-paths.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lua/aider.lua --replace '@aider@' ${aider-chat}/bin/aider
|
||||
substituteInPlace lua/helpers.lua --replace '@aider@' ${aider-chat}/bin/aider
|
||||
'';
|
||||
};
|
||||
|
||||
refactoring-nvim = super.refactoring-nvim.overrideAttrs {
|
||||
dependencies = with self; [ nvim-treesitter plenary-nvim ];
|
||||
};
|
||||
|
@ -0,0 +1,26 @@
|
||||
diff --git a/lua/aider.lua b/lua/aider.lua
|
||||
index 38db0d1..d1ad6d5 100644
|
||||
--- a/lua/aider.lua
|
||||
+++ b/lua/aider.lua
|
||||
@@ -26,7 +26,7 @@ function M.AiderOpen(args, window_type)
|
||||
if M.aider_buf and vim.api.nvim_buf_is_valid(M.aider_buf) then
|
||||
helpers.open_buffer_in_new_window(window_type, M.aider_buf)
|
||||
else
|
||||
- command = 'aider ' .. (args or '')
|
||||
+ command = '@aider@ ' .. (args or '')
|
||||
helpers.open_window(window_type)
|
||||
command = helpers.add_buffers_to_command(command)
|
||||
M.aider_job_id = vim.fn.termopen(command, {on_exit = OnExit})
|
||||
diff --git a/lua/helpers.lua b/lua/helpers.lua
|
||||
index 152182b..aa21584 100644
|
||||
--- a/lua/helpers.lua
|
||||
+++ b/lua/helpers.lua
|
||||
@@ -63,7 +63,7 @@ end
|
||||
|
||||
local function build_background_command(args, prompt)
|
||||
prompt = prompt or "Complete as many todo items as you can and remove the comment for any item you complete."
|
||||
- local command = 'aider --msg "' .. prompt .. '" ' .. (args or '')
|
||||
+ local command = '@aider@ --msg "' .. prompt .. '" ' .. (args or '')
|
||||
command = add_buffers_to_command(command)
|
||||
return command
|
||||
end
|
@ -49,6 +49,7 @@ https://github.com/stevearc/aerial.nvim/,,
|
||||
https://github.com/Numkil/ag.nvim/,,
|
||||
https://github.com/derekelkins/agda-vim/,,
|
||||
https://github.com/aduros/ai.vim/,HEAD,
|
||||
https://github.com/joshuavial/aider.nvim/,HEAD,
|
||||
https://github.com/slashmili/alchemist.vim/,,
|
||||
https://github.com/dense-analysis/ale/,,
|
||||
https://github.com/vim-scripts/align/,,
|
||||
|
Loading…
Reference in New Issue
Block a user