Compare commits

..

2 commits

Author SHA1 Message Date
ddb232fba9
Neovim, add missing remaps 2026-05-13 00:02:39 -07:00
cfe5f11691
Neovim, add opencode support 2026-05-12 23:46:40 -07:00

View file

@ -19,6 +19,7 @@
lualine.enable = lib.mkOption { default = true; }; lualine.enable = lib.mkOption { default = true; };
luasnip.enable = lib.mkOption { default = false; }; luasnip.enable = lib.mkOption { default = false; };
nvimcmp.enable = lib.mkOption { default = true; }; nvimcmp.enable = lib.mkOption { default = true; };
opencode.enable = lib.mkOption { default = true; };
telescope = { telescope = {
enable = lib.mkOption { default = true; }; enable = lib.mkOption { default = true; };
fzf.enable = lib.mkOption { default = true; }; fzf.enable = lib.mkOption { default = true; };
@ -74,16 +75,67 @@
mode = "n"; mode = "n";
action = mkRaw "vim.diagnostic.open_float"; action = mkRaw "vim.diagnostic.open_float";
} }
# -- Easy Split Navigation {
# -- nnoremap <C-J> <C-W><C-J> key = "<C-J>";
# -- nnoremap <C-K> <C-W><C-K> mode = "n";
# -- nnoremap <C-L> <C-W><C-L> action = "<C-W><C-J>";
# -- nnoremap <C-H> <C-W><C-H> }
# {
# -- Easy copy and pasting to external programs key = "<C-K>";
# -- map <C-y> "+yy mode = "n";
# -- map <C-p> "+P action = "<C-W><C-K>";
]; }
{
key = "<C-L>";
mode = "n";
action = "<C-W><C-L>";
}
{
key = "<C-H>";
mode = "n";
action = "<C-W><C-H>";
}
{
key = "<C-y>";
mode = "x";
action = "\"+y";
options.remap = true;
}
{
key = "<C-y>";
mode = "n";
action = "\"+yy";
options.remap = true;
}
{
key = "<C-p>";
mode = "n";
action = "\"+P";
options.remap = true;
}
] ++ lib.lists.optionals config.neovim.plugins.opencode.enable (let
ocFunc = cmd: let raw = "function() require('opencode').${cmd} end";
in (config.lib.nixvim.mkRaw raw);
in [
{
key = "<leader>ot";
action = ocFunc "toggle()";
mode = [ "n" "x" ];
options.desc = "Toggle opencode";
}
{
key = "<leader>oa";
action = ocFunc "ask('', { submit = true })";
mode = [ "n" "x" ];
options.desc = "Ask opencode...";
}
{
key = "<leader>or";
action = ocFunc "operator('@this ')";
mode = [ "n" "x" ];
options.desc = "Add range to opencode";
}
]);
}; };
programs.nixvim.colorschemes = with config.neovim.themes; { programs.nixvim.colorschemes = with config.neovim.themes; {
@ -126,6 +178,16 @@
}; };
}; };
opencode = {
enable = opencode.enable;
settings = {
input.enabled = true;
lsp.enabled = true;
events.permissions.enabled = false;
};
};
snacks.enable = opencode.enable;
telescope = { telescope = {
enable = telescope.enable; enable = telescope.enable;
keymaps = { keymaps = {