Question: allow persistent size for defined buffers?
Hey, there. I hope a quick question is okay here.
I couldn't find out how or if it's possible to prevent a buffer from being resized / allow persistent size for it. E.g., when there is a split with nvimtree while UI resizing happens and this split should keep its size while others will be relatively sized.
Already thank you for the development m8 👍
Yest, it's quite annoying when NvimTree or Tree in DiffView are resized as well.
I solved this back then in my personal config using neo-trees event handlers and autocommands.
Storing the tree window id and width when opening it: https://github.com/tenxsoydev/nxvim/blob/e697a0cece986eb595679a214343dec9c27db966/lua/nxvim/plugins/neo-tree.lua#L171-L179
Setting the tree window width to it's size (preserving it) on application window resize: https://github.com/tenxsoydev/nxvim/blob/e697a0cece986eb595679a214343dec9c27db966/lua/nxvim/plugins/neo-tree.lua#L196-L203
Updating it's stored size when resizing the tree window: https://github.com/tenxsoydev/nxvim/blob/e697a0cece986eb595679a214343dec9c27db966/lua/nxvim/plugins/neo-tree.lua#L220
This approach should be reproducible with diffviews hooks or with autocomands for any other window. Maybe that's at least of some help @D00mch.