Repository navigation
fix: resizing with top/bottom integrations - #6
Conversation
There was a problem hiding this comment.
Pull request overview
Adds coverage and fixes for resizing behavior when “top”/“bottom” integrations (e.g., Fugitive/Trouble) are open, ensuring side buffers close/reopen correctly as the editor width crosses the minimum threshold.
Changes:
- Treat
top/bottomconfigured integrations as “integration buffers” for layout/editable-window detection. - Add resizing tests for plain, top, bottom, and combined top+bottom integration scenarios.
- Update test bootstrapping to use a
packpath-based deps layout and expand Makefile-managed test dependencies.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
lua/zen/init.lua |
Extends integration detection to include top/bottom so resize logic behaves correctly with those integrations open. |
tests/test_resizing.lua |
Adds regression tests covering resizing behavior with and without top/bottom integrations. |
tests/scripts/minimal_init.lua |
Switches test init from rtp injection to packpath-based deps loading. |
tests/scripts/init_with_zen.lua |
Extends test init to configure top/bottom integrations and load required plugins. |
Makefile |
Switches deps fetching to Neovim package layout and adds more plugin deps for tests. |
.luarc.json |
Updates Lua LS workspace library path and adds MiniTest global. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,4 @@ | |||
| vim.cmd([[let &rtp.=','.getcwd()]]) | |||
| vim.cmd("set rtp+=deps/mini.nvim") | |||
| vim.opt.packpath:prepend("deps") | |||
There was a problem hiding this comment.
vim.opt.packpath:prepend('deps') does not by itself ensure start packages under deps/pack/*/start/* are added to runtimepath before the subsequent require('mini.test') runs. On a clean environment this can make require('mini.test') fail because mini.nvim hasn't been loaded yet. Consider either (a) calling :packloadall (or :packadd mini.nvim) after adjusting packpath and before the require, or (b) directly prepending the mini.nvim path to runtimepath as before.
| vim.opt.packpath:prepend("deps") | |
| vim.opt.packpath:prepend("deps") | |
| vim.cmd([[packadd mini.nvim]]) |
| vim.cmd([[let &rtp.=','.getcwd()]]) | ||
| vim.cmd("set rtp+=deps/mini.nvim") | ||
| vim.opt.packpath:prepend("deps") | ||
|
|
||
| vim.o.columns = 240 | ||
| vim.o.lines = 52 | ||
|
|
||
| require("mini.test").setup() | ||
| require("zen").setup() | ||
| require("trouble").setup({ open_no_results = true }) | ||
| require("zen").setup({ |
There was a problem hiding this comment.
Same issue as minimal_init.lua: after prepending packpath, this script immediately requires mini.test, trouble, and zen. If start packages under deps/pack/*/start/* are not loaded into runtimepath yet, these require calls will fail. Add an explicit :packloadall/packadd after setting packpath, or restore runtimepath manipulation for the needed plugins.
| $(START_DIR)/mini.nvim: | ||
| git clone --depth 1 https://github.com/echasnovski/mini.nvim $@ | ||
|
|
||
| $(START_DIR)/vim-fugitive: | ||
| git clone --depth 1 https://github.com/tpope/vim-fugitive $@ | ||
|
|
||
| $(START_DIR)/fyler.nvim: | ||
| git clone --depth 1 https://github.com/A7Lavinraj/fyler.nvim $@ | ||
|
|
||
| $(START_DIR)/trouble.nvim: | ||
| git clone --depth 1 https://github.com/folke/trouble.nvim $@ | ||
|
|
||
| $(START_DIR)/neotest: | ||
| git clone --depth 1 https://github.com/nvim-neotest/neotest $@ | ||
|
|
||
| $(START_DIR)/nvim-nio: | ||
| git clone --depth 1 https://github.com/nvim-neotest/nvim-nio $@ | ||
|
|
||
| $(START_DIR)/plenary.nvim: | ||
| git clone --depth 1 https://github.com/nvim-lua/plenary.nvim $@ | ||
|
|
||
| $(START_DIR)/fixcursorhold: |
There was a problem hiding this comment.
The git clone ... $@ targets assume $(START_DIR) already exists. On a fresh checkout deps/pack/testing/start won't exist, so git clone will fail because parent directories are missing. Add a mkdir -p $(START_DIR) step (e.g., an order-only prerequisite or a dedicated directory target) before cloning.
| $(START_DIR)/mini.nvim: | |
| git clone --depth 1 https://github.com/echasnovski/mini.nvim $@ | |
| $(START_DIR)/vim-fugitive: | |
| git clone --depth 1 https://github.com/tpope/vim-fugitive $@ | |
| $(START_DIR)/fyler.nvim: | |
| git clone --depth 1 https://github.com/A7Lavinraj/fyler.nvim $@ | |
| $(START_DIR)/trouble.nvim: | |
| git clone --depth 1 https://github.com/folke/trouble.nvim $@ | |
| $(START_DIR)/neotest: | |
| git clone --depth 1 https://github.com/nvim-neotest/neotest $@ | |
| $(START_DIR)/nvim-nio: | |
| git clone --depth 1 https://github.com/nvim-neotest/nvim-nio $@ | |
| $(START_DIR)/plenary.nvim: | |
| git clone --depth 1 https://github.com/nvim-lua/plenary.nvim $@ | |
| $(START_DIR)/fixcursorhold: | |
| $(START_DIR): | |
| mkdir -p $@ | |
| $(START_DIR)/mini.nvim: | $(START_DIR) | |
| git clone --depth 1 https://github.com/echasnovski/mini.nvim $@ | |
| $(START_DIR)/vim-fugitive: | $(START_DIR) | |
| git clone --depth 1 https://github.com/tpope/vim-fugitive $@ | |
| $(START_DIR)/fyler.nvim: | $(START_DIR) | |
| git clone --depth 1 https://github.com/A7Lavinraj/fyler.nvim $@ | |
| $(START_DIR)/trouble.nvim: | $(START_DIR) | |
| git clone --depth 1 https://github.com/folke/trouble.nvim $@ | |
| $(START_DIR)/neotest: | $(START_DIR) | |
| git clone --depth 1 https://github.com/nvim-neotest/neotest $@ | |
| $(START_DIR)/nvim-nio: | $(START_DIR) | |
| git clone --depth 1 https://github.com/nvim-neotest/nvim-nio $@ | |
| $(START_DIR)/plenary.nvim: | $(START_DIR) | |
| git clone --depth 1 https://github.com/nvim-lua/plenary.nvim $@ | |
| $(START_DIR)/fixcursorhold: | $(START_DIR) |
No description provided.