Skip to content

fix(navigation): support quirky case for snacks.nvim#140

Merged
aserowy merged 2 commits into
aserowy:mainfrom
rudenkornk:snacks
Apr 12, 2026
Merged

fix(navigation): support quirky case for snacks.nvim#140
aserowy merged 2 commits into
aserowy:mainfrom
rudenkornk:snacks

Conversation

@rudenkornk

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings April 9, 2026 11:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a Snacks.nvim-specific wrapper to improve tmux.nvim navigation behavior when Snacks’ custom window engine is in use (notably for snacks_explorer), aligning border/float detection with Snacks’ internal layout state.

Changes:

  • Introduce tmux.wrapper.snacks to query focused Snacks picker, infer float vs tiled, and map picker position to Neovim directions.
  • Update tmux.wrapper.nvim border and float detection to defer to the focused Snacks picker when present.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
lua/tmux/wrapper/snacks.lua New wrapper for interacting with Snacks picker state (focus, float/tiled inference, position mapping).
lua/tmux/wrapper/nvim.lua Uses the Snacks wrapper to override border/float detection when a Snacks picker is focused.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/tmux/wrapper/snacks.lua Outdated
Comment thread lua/tmux/wrapper/snacks.lua Outdated
Comment thread lua/tmux/wrapper/snacks.lua
@rudenkornk rudenkornk force-pushed the snacks branch 2 times, most recently from 7b8689a to 5ca93d7 Compare April 9, 2026 11:49
@aserowy

aserowy commented Apr 9, 2026

Copy link
Copy Markdown
Owner

heho,

ty for the pr.
i will look into it tomorrow.

king regards
Alexander

@aserowy aserowy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Heho,

it would be awesome if you could add tests for snacks behavior as well. Besides tests, pr looks good.

Just out of interest: did you tested it with and without snacks?

kind regards
Alexander

@rudenkornk

Copy link
Copy Markdown
Contributor Author

Hi, thanks

Added tests (not without LLM help). snacks are emulated as a mock.

Also tested manually. With snacks everything works as expected (snacks pickers correctly recognized as floating or tiled windows and navigation and resize work correctly).
Without snacks (I just replaced Snacks with nonexistent SnacksAAAA in the plugin) everything works normal without crashing as of before the fix.

@aserowy aserowy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

heho,

nice. llm produced code (if not sloppy) if completly ok. One picky thing though. remove all comments inside tests, because they are redundant. -- abc above describe("abc..") will age badly.

and please commit normally. thus, i can check what changed only and do not have to review everything again, and again, and :D

kind regards and thx for your help
Alexander

@rudenkornk

Copy link
Copy Markdown
Contributor Author

Thanks, removed redundant comments. I kept only those which actually explain code.

I am not sure what do you mean by "committing normally", probably by committing only diff?
Either way, I have committed changes as a separate commit -- do not forget to squash & edit commit message to keep history clean. :)

Also, github has a nice feature, which allows to see diff even if PR was force-pushed -- just on the right of the push event there is a Compare button :)

@rudenkornk rudenkornk requested a review from aserowy April 12, 2026 07:45
@aserowy aserowy merged commit 23f91c5 into aserowy:main Apr 12, 2026
2 checks passed
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.

3 participants