mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-17 17:28:07 +00:00
fix: tmux navigation inside nvim->lazygit
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = vim.api.nvim_create_augroup('tmux-nav-passthrough', { clear = true }),
|
||||
pattern = 'lazygit',
|
||||
callback = function(ev)
|
||||
local directions = { ['<C-h>'] = 'L', ['<C-j>'] = 'D', ['<C-k>'] = 'U', ['<C-l>'] = 'R' }
|
||||
for key, dir in pairs(directions) do
|
||||
vim.keymap.set({ 'n', 't' }, key, function()
|
||||
vim.fn.system('tmux select-pane -' .. dir)
|
||||
end, { buffer = ev.buf, nowait = true, silent = true })
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
return {
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
|
||||
Reference in New Issue
Block a user