Add opencode.nvim
This commit is contained in:
parent
e579577ebc
commit
d4ede85a43
3 changed files with 44 additions and 0 deletions
31
modules/editor/vim/lua/plugins/opencode.lua
Normal file
31
modules/editor/vim/lua/plugins/opencode.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
return {
|
||||
"NickvanDyke/opencode.nvim",
|
||||
config = function()
|
||||
---@type opencode.Opts
|
||||
vim.g.opencode_opts = {
|
||||
provider = {
|
||||
enabled = "kitty",
|
||||
kitty = {
|
||||
location = "tab"
|
||||
}
|
||||
}
|
||||
}
|
||||
vim.o.autoread = true
|
||||
|
||||
vim.keymap.set({ "n", "x" }, "<leader>oa", function()
|
||||
require("opencode").ask("@this: ", { submit = true })
|
||||
end, { desc = "Ask opencode" })
|
||||
|
||||
vim.keymap.set({ "n", "x" }, "<leader>oo", function()
|
||||
require("opencode").select()
|
||||
end, { desc = "Execute opencode action…" })
|
||||
|
||||
vim.keymap.set({ "n", "x" }, "<leader>os", function()
|
||||
require("opencode").prompt("@this")
|
||||
end, { desc = "Add to opencode" })
|
||||
|
||||
vim.keymap.set({ "n", "t" }, "<leader>o.", function()
|
||||
require("opencode").toggle()
|
||||
end, { desc = "Toggle opencode" })
|
||||
end,
|
||||
}
|
||||
|
|
@ -138,6 +138,17 @@ in
|
|||
avante-nvim
|
||||
blink-cmp-avante
|
||||
img-clip-nvim
|
||||
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "opencode.nvim";
|
||||
version = "2025-12-04";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "NickvanDyke";
|
||||
repo = "opencode.nvim";
|
||||
rev = "963fad75f794deb85d1c310d2e2cb033da44f670";
|
||||
hash = "sha256-nKOsHgMptHnOS+SCTHa77sQ/ZiUY0aW26I8GN7ocRHE=";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue