From 22c88f46f86166959ad22054230395ea9b045e7b Mon Sep 17 00:00:00 2001 From: Adam French Date: Fri, 23 Oct 2026 20:56:55 +0100 Subject: [PATCH] Replace claudecode.nvim with sidekick.nvim, add which-key AI icons Co-Authored-By: Claude Opus 5.5 --- nvim/README.md | 10 +++---- nvim/lua/plugins/claudecode.lua | 38 -------------------------- nvim/lua/plugins/sidekick.lua | 48 +++++++++++++++++++++++++++++++++ nvim/lua/plugins/vimade.lua | 5 +++- nvim/lua/plugins/whichkey.lua | 10 ++++++- 5 files changed, 66 insertions(+), 45 deletions(-) delete mode 100644 nvim/lua/plugins/claudecode.lua create mode 100644 nvim/lua/plugins/sidekick.lua diff --git a/nvim/README.md b/nvim/README.md index 3825881..5d09aee 100644 --- a/nvim/README.md +++ b/nvim/README.md @@ -17,11 +17,11 @@ this file only covers what's different. Press `` and wait for which-key, | `?` | Search all keymaps | | `` | Toggle terminal (project root, bottom of current window) | | **AI** — `a` | | -| `ac` / `af` | Toggle / focus Claude Code | -| `ar` / `aC` | Resume / continue last Claude session | -| `ab` | Add current buffer to Claude context | -| `as` | Send selection (visual) or file (explorer) to Claude | -| `aa` / `ad` | Accept / deny Claude's proposed diff | +| `aa` / `ac` | Toggle CLI / toggle Claude ([sidekick](https://github.com/folke/sidekick.nvim)) | +| `as` / `ad` | Select CLI / detach session | +| `at` / `af` / `av` | Send this / file / visual selection | +| `ap` | Pick a prompt | +| `` | Focus the sidekick terminal (any mode) | | **Git** (Neogit) — `g` | | | `gg` | Neogit status | | `gc` / `gl` / `gp` | Commit / log / push | diff --git a/nvim/lua/plugins/claudecode.lua b/nvim/lua/plugins/claudecode.lua deleted file mode 100644 index 6896c0a..0000000 --- a/nvim/lua/plugins/claudecode.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - { - "coder/claudecode.nvim", - dependencies = { "folke/snacks.nvim" }, - opts = { - terminal = { - provider = "snacks", - snacks_win_opts = { - relative = "win", - position = "bottom", - height = 0.3, - }, - }, - diff_opts = { - layout = "vertical", - open_in_new_tab = true, - keep_terminal_focus = true, - }, - }, - keys = { - { "ac", "ClaudeCode", desc = "Toggle Claude" }, - { "af", "ClaudeCodeFocus", desc = "Focus Claude" }, - { "ar", "ClaudeCode --resume", desc = "Resume Claude" }, - { "aC", "ClaudeCode --continue", desc = "Continue Claude" }, - { "ab", "ClaudeCodeAdd %", desc = "Add current buffer" }, - { "as", "ClaudeCodeSend", mode = "v", desc = "Send to Claude" }, - { - "as", - "ClaudeCodeTreeAdd", - desc = "Add file", - ft = { "NvimTree", "neo-tree", "oil" }, - }, - -- Diff management - { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, - { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, - }, - }, -} diff --git a/nvim/lua/plugins/sidekick.lua b/nvim/lua/plugins/sidekick.lua new file mode 100644 index 0000000..a8b49b1 --- /dev/null +++ b/nvim/lua/plugins/sidekick.lua @@ -0,0 +1,48 @@ +return { + { + "folke/sidekick.nvim", + opts = { + -- next edit suggestions need the Copilot LSP + nes = { enabled = false }, + }, + keys = { + { + "", + function() require("sidekick.cli").focus() end, + mode = { "n", "t", "i", "x" }, + desc = "Sidekick Focus", + }, + { "aa", function() require("sidekick.cli").toggle() end, desc = "Toggle CLI" }, + { + "ac", + function() require("sidekick.cli").toggle({ name = "claude", focus = true }) end, + desc = "Toggle Claude", + }, + { + "as", + function() require("sidekick.cli").select({ filter = { installed = true } }) end, + desc = "Select CLI", + }, + { "ad", function() require("sidekick.cli").close() end, desc = "Detach CLI session" }, + { + "at", + function() require("sidekick.cli").send({ msg = "{this}" }) end, + mode = { "n", "x" }, + desc = "Send this", + }, + { "af", function() require("sidekick.cli").send({ msg = "{file}" }) end, desc = "Send file" }, + { + "av", + function() require("sidekick.cli").send({ msg = "{selection}" }) end, + mode = "x", + desc = "Send selection", + }, + { + "ap", + function() require("sidekick.cli").prompt() end, + mode = { "n", "x" }, + desc = "Select prompt", + }, + }, + }, +} diff --git a/nvim/lua/plugins/vimade.lua b/nvim/lua/plugins/vimade.lua index 3c78b84..89f3c74 100644 --- a/nvim/lua/plugins/vimade.lua +++ b/nvim/lua/plugins/vimade.lua @@ -5,9 +5,12 @@ return { recipe = { "minimalist", { animate = true } }, fadelevel = 0.8, blocklist = { - claude_terminal = { + snacks_terminal = { buf_opts = { ft = "snacks_terminal" }, }, + sidekick_terminal = { + buf_opts = { ft = "sidekick_terminal" }, + }, }, }, } diff --git a/nvim/lua/plugins/whichkey.lua b/nvim/lua/plugins/whichkey.lua index 6d53cad..6f79021 100644 --- a/nvim/lua/plugins/whichkey.lua +++ b/nvim/lua/plugins/whichkey.lua @@ -5,7 +5,15 @@ return { opts = { preset = "helix", spec = { - { "a", group = "ai", mode = { "n", "v" } }, + { "a", group = "ai", mode = { "n", "v" }, icon = { icon = "󰚩", color = "green" } }, + { "aa", icon = { icon = "󰆍", color = "green" } }, + { "ac", icon = { icon = "󰧑", color = "orange" } }, + { "as", icon = { icon = "󰉹", color = "azure" } }, + { "ad", icon = { icon = "󰅖", color = "red" } }, + { "at", icon = { icon = "󰆤", color = "yellow" }, mode = { "n", "x" } }, + { "af", icon = { icon = "󰈙", color = "blue" } }, + { "av", icon = { icon = "󰒅", color = "cyan" }, mode = "x" }, + { "ap", icon = { icon = "󰍩", color = "purple" }, mode = { "n", "x" } }, }, }, keys = {