refactor(plugins): streamline Neovim plugin configuration and keybindings
This commit is contained in:
1 parent
32f43b8335
commit
8372131167
9 files changed
+32
-156
No files matched your search
@@ -1,9 +1,10 @@
|
||||
--- <C-h/j/k/l> pane navigation that follows whatever multiplexer Neovim is
|
||||
--- running under (herdr, tmux, or bare kitty) — see config.pane_nav.
|
||||
---
|
||||
--- This replaces AstroNvim's smart-splits mappings on the same keys (which only
|
||||
--- know tmux/wezterm/kitty and would move the wrong layer inside herdr).
|
||||
--- smart-splits itself stays for the <C-Up/Down/Left/Right> resize mappings.
|
||||
--- This replaces AstroNvim's smart-splits mappings (which only know
|
||||
--- tmux/wezterm/kitty and would move the wrong layer inside herdr). The plugin
|
||||
--- is disabled in plugins/user.lua; its <C-Up/Down/Left/Right> resize binds
|
||||
--- are plain :resize here.
|
||||
|
||||
local nav = require "config.pane_nav"
|
||||
|
||||
@@ -16,6 +17,14 @@ local moves = {
|
||||
["<C-L>"] = "right",
|
||||
}
|
||||
|
||||
--- AstroNvim's key spelling again, overriding the smart-splits resize entries.
|
||||
local resizes = {
|
||||
["<C-Up>"] = { "resize +2", "Resize split taller" },
|
||||
["<C-Down>"] = { "resize -2", "Resize split shorter" },
|
||||
["<C-Left>"] = { "vertical resize -2", "Resize split narrower" },
|
||||
["<C-Right>"] = { "vertical resize +2", "Resize split wider" },
|
||||
}
|
||||
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
opts = function(_, opts)
|
||||
@@ -27,5 +36,8 @@ return {
|
||||
maps.x[key] = maps.n[key]
|
||||
maps.t[key] = { nav.terminal(dir), desc = desc }
|
||||
end
|
||||
for key, spec in pairs(resizes) do
|
||||
maps.n[key] = { "<Cmd>" .. spec[1] .. "<CR>", desc = spec[2] }
|
||||
end
|
||||
end,
|
||||
}
|
||||
Reference in new issue
Block a user