From d9e61391f06862e7bc8758577d9056395cadacf4 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 16 Feb 2026 19:43:31 +0100 Subject: [PATCH] Add binding to send data to opencode --- modules/cli/home.nix | 1 + nvim/lua/plugins/opencode.lua | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/modules/cli/home.nix b/modules/cli/home.nix index 8f6406f..864dff0 100644 --- a/modules/cli/home.nix +++ b/modules/cli/home.nix @@ -13,6 +13,7 @@ programs.opencode = { enable = true; settings = { + theme = "catppuccin"; keybinds = { variant_cycle = "ctrl+n"; input_clear = "ctrl+u"; diff --git a/nvim/lua/plugins/opencode.lua b/nvim/lua/plugins/opencode.lua index af60a92..6cdc413 100644 --- a/nvim/lua/plugins/opencode.lua +++ b/nvim/lua/plugins/opencode.lua @@ -17,6 +17,10 @@ return { }, after = function(plug) vim.g.opencode_opts = plug.opts + vim.keymap.set({ "n", "x" }, "gl", function() return require("opencode").operator("@this ") end, + { desc = "Add range to opencode", expr = true }) + vim.keymap.set("n", "gll", function() return require("opencode").operator("@this ") .. "_" end, + { desc = "Add line to opencode", expr = true }) end, }, }