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

fix(autowidth): checking extraneous filetype #37

Open dan-myles opened 1 year ago

dan-myles commented 1 year ago

Some plugins will create splits in windows that do not initially have a file type. This can be problematic as the auto command will fire and resize that window. We do not want to resize these windows as usually they are information windows such as Lazy and Mason opening up floating windows.

However, floating windows are already ignored, some plugins just open up vertical splits to show some information and forego including a file type initially or at all.

This pull request does not affect the :vsplit or :vnew commands as those do contain a file type initially, those commands still work and will be automagically resized. It seems to only affect some plugins whose authors do not set a file type explicitly when opening up a new vertical split. Something like LSPSaga's code outline has this issue.