Description
First of all thanks for a great plugin!
Is your feature request related to a problem? Please describe.
Using tmux panes, or any window/pane resizing feature of your terminal, causes the nvim virtual screen to resize. If I open LazyGit in tmux or a terminal, resizing the viewport doesn't cause LazyGit inside nvim to adapt to the new size.
It works on LazyGit from the terminal, so I believe the nvim window/frame is the one not resizing accordingly.
Additionally, things like Telescope previews can listen to the window resize and adjust accordingly, and the same problem happens in any terminal when resizing, so it is not an inherent tmux+nvim limitation.
Just open LG from nvim and resize the window to see.
Screenshots of issue
- Before opening, while zoomed out
- After opening, while zoomed out
- After zooming into the nvim pane with LG still open
This works in the other direction as well:
Describe the solution you'd like
Ideally, the containing window of LG should resize when the nvim viewport resizes.
Additional context
My config:
return {
"kdheepak/lazygit.nvim",
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
vim.keymap.set('n', '<leader>gs', '<Cmd>LazyGit<CR>', { desc = 'Lazy[G]it', silent = true })
end,
}