45 lines
1 KiB
Nix
45 lines
1 KiB
Nix
{ ... }:
|
|
|
|
{
|
|
plugins.opencode = {
|
|
enable = true;
|
|
settings = {
|
|
provider.enabled = "tmux";
|
|
};
|
|
};
|
|
|
|
keymaps = [
|
|
{
|
|
action.__raw = ''function() require("opencode").ask("@this: ", { submit = true }) end'';
|
|
key = "<leader>at";
|
|
options.desc = "ask opencode about this";
|
|
}
|
|
{
|
|
action.__raw = ''function() require("opencode").toggle() end'';
|
|
key = "<leader>aa";
|
|
options.desc = "toggle opencode";
|
|
}
|
|
{
|
|
action.__raw = ''function() require("opencode").select() end'';
|
|
key = "<leader>as";
|
|
options.desc = "select an opencode action";
|
|
}
|
|
{
|
|
mode = [
|
|
"n"
|
|
"x"
|
|
];
|
|
action.__raw = ''function() return require("opencode").operator("@this ") end'';
|
|
key = "go";
|
|
options.desc = "add range to opencode";
|
|
}
|
|
{
|
|
mode = [
|
|
"n"
|
|
];
|
|
action.__raw = ''function() return require("opencode").operator("@this ") .. "_" end'';
|
|
key = "go";
|
|
options.desc = "add line to opencode";
|
|
}
|
|
];
|
|
}
|