nix-config/dotfiles/nvim/lua/plugins/tmux.lua
2024-08-03 22:33:30 +02:00

32 lines
1.2 KiB
Lua

return {
{
"aserowy/tmux.nvim",
event = "VeryLazy",
config = function()
local tmux = require("tmux")
tmux.setup({
copy_sync = {
enable = false,
},
navigation = {
cycle_navigation = false,
enable_default_keybindings = false,
persist_zoom = true,
},
resize = {
enable_default_keybindings = false,
},
})
end,
keys = {
{ "<c-h>", mode = { "n", "t", "i" }, '<cmd>lua require("tmux").move_left()<cr>' },
{ "<c-l>", mode = { "n", "t", "i" }, '<cmd>lua require("tmux").move_right()<cr>' },
{ "<c-j>", mode = { "n", "t", "i" }, '<cmd>lua require("tmux").move_bottom()<cr>' },
{ "<c-k>", mode = { "n", "t", "i" }, '<cmd>lua require("tmux").move_top()<cr>' },
{ "<c-left>", mode = { "n", "t", "i" }, '<cmd>lua require("tmux").resize_left()<cr>' },
{ "<c-down>", mode = { "n", "t", "i" }, '<cmd>lua require("tmux").resize_bottom()<cr>' },
{ "<c-up>", mode = { "n", "t", "i" }, '<cmd>lua require("tmux").resize_top()<cr>' },
{ "<c-right>", mode = { "n", "t", "i" }, '<cmd>lua require("tmux").resize_right()<cr>' },
},
},
}