shortcuts / no-neck-pain.nvim

☕ Dead simple yet super extensible plugin to center the currently focused buffer to the middle of the screen.
MIT License
459 stars 12 forks source link

feat: top and bottom windows #340

Open sand4rt opened 3 months ago

sand4rt commented 3 months ago

Describe the problem

Thanks again for the plugin :) I found a slight inconvenience with bottom and top buffers/windows;

https://github.com/shortcuts/no-neck-pain.nvim/assets/17591696/396764a6-c93e-4136-a39d-ce2b6cb7ffbc

  1. open a top or bottom buffer (e.g. fugitive, trouble or quick-fix list)
  2. open a side buffer (e.g. neotree)
  3. close the side buffer (e.g. neotree)

Describe the solution

The bottom or top buffer should take its full width again when the side buffer is closed. Maybe with?:

opts = {
        integrations = {
            NeoTree = {
                position = "left",
            },
            fugitive = {
                position = "top", -- or bottom
            },
        },
    }  
}
shortcuts commented 3 months ago

Thanks for reporting @sand4rt and discovering all of those issues ahah

I also noticed that, even copen behaves this way, I'm currently trying to find the root cause of this!

shortcuts commented 3 months ago

Hey! So I've found the issue, turns out it's a bit more complicated than expected to fix but still in progress. I'll try to leverage the builtin winlayout fn which should also remove some complexity of the codebase