anuvyklack / windows.nvim

Automatically expand width of the current window. Maximizes and restore it. And all this with nice animations!
MIT License
537 stars 15 forks source link

Feature: Auto height #17

Open JoseConseco opened 2 years ago

JoseConseco commented 2 years ago

Imo would be cool to have option to auto adjust win height too. Thanks for great plug!

Raekh commented 2 years ago

+1. Was even thinking it was a bug that auto height wasn't working

bassamsdata commented 1 year ago

+1 That's would be awesome to have this feature such as minheight.

edited: typo

ryuheechul commented 1 year ago

+1 and I also thought the same way as @Raekh especially when I only had 2 columns of windows 😅

After briefly looking at the code, I think the key point would be able to write a function, Window:get_wanted_height that works similar to below. https://github.com/anuvyklack/windows.nvim/blob/c7492552b23d0ab30325e90b56066ec51242adc8/lua/windows/lib/api.lua#L20-L43

But since there is no textheight, line could be used to calculate the "wanted_height" maybe?

piersolenski commented 7 months ago

+1 This would be awesome!