Tidy nvim config: per-press terminal root, trim which-key, refresh README

- Resolve LazyVim.root() when <C-/> is pressed, not once at startup
- Drop which-key spec duplicated from LazyVim defaults
- Remove no-op split_width_percentage from claudecode
- Rewrite README with keymap cheat sheet
- Add tree-sitter-cli to packages (needed to build parsers on nvim 0.12)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 23:23:06 +01:00
co-authored by Claude Opus 5.5
parent 6e2bbc5277
commit 6f301c67fa
5 changed files with 48 additions and 71 deletions
+2 -46
View File
@@ -1,60 +1,16 @@
-- LazyVim already defines all the default groups; only override what differs.
return {
{
"folke/which-key.nvim",
event = "VeryLazy",
opts_extend = { "spec" },
opts = {
preset = "helix",
spec = {
{
mode = { "n", "x" },
{ "<leader><tab>", group = "tabs" },
{ "<leader>c", group = "code" },
{ "<leader>d", group = "debug" },
{ "<leader>dp", group = "profiler" },
{ "<leader>f", group = "file/find" },
{ "<leader>g", group = "git" },
{ "<leader>gh", group = "hunks" },
{ "<leader>q", group = "quit/session" },
{ "<leader>s", group = "search" },
{ "<leader>u", group = "ui" },
{ "<leader>x", group = "diagnostics/quickfix" },
{ "[", group = "prev" },
{ "]", group = "next" },
{ "g", group = "goto" },
{ "gs", group = "surround" },
{ "z", group = "fold" },
{
"<leader>b",
group = "buffer",
expand = function()
return require("which-key.extras").expand.buf()
end,
},
{
"<leader>w",
group = "windows",
proxy = "<c-w>",
expand = function()
return require("which-key.extras").expand.win()
end,
},
-- better descriptions
{ "gx", desc = "Open with system app" },
{ "gc", group = "comment", desc = "Toggle comment" },
},
{ "<leader>a", group = "ai", mode = { "n", "v" } },
},
},
keys = {
-- disable LazyVim's default <leader>? so the snacks keymaps picker owns it
{ "<leader>?", false },
{
"<c-w><space>",
function()
require("which-key").show({ keys = "<c-w>", loop = true })
end,
desc = "Window Hydra Mode (which-key)",
},
},
},
}