feat: nixvim config

currently only for dnsc-air. can simply be imported in other hosts
This commit is contained in:
Dennis Schoepf 2026-02-04 19:03:10 +01:00
parent ff32ecb811
commit 6543d4a7f3
21 changed files with 1541 additions and 10 deletions

45
modules/nixvim/ai.nix Normal file
View file

@ -0,0 +1,45 @@
{ ... }:
{
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";
}
];
}