Skip to content

fix: resizing with top/bottom integrations - #6

Merged
sand4rt merged 1 commit into
mainfrom
test-resize
Apr 16, 2026
Merged

sand4rt merged 1 commit into
mainfrom
test-resize

Conversation

@sand4rt

@sand4rt sand4rt commented Apr 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 16, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/bottom configured 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")

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
vim.opt.packpath:prepend("deps")
vim.opt.packpath:prepend("deps")
vim.cmd([[packadd mini.nvim]])

Copilot uses AI. Check for mistakes.
Comment on lines 1 to +9
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({

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread Makefile
Comment on lines +19 to +40
$(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:

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
$(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)

Copilot uses AI. Check for mistakes.
@sand4rt
sand4rt merged commit 394d7cf into main Apr 16, 2026
5 checks passed
@sand4rt
sand4rt deleted the test-resize branch April 16, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants