Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add windows-list to allow custom window candidates #70

Merged
merged 3 commits into from
Apr 21, 2024

Conversation

henry-hsieh
Copy link

In multi-windows mode, there will be some windows you don't want to jump to. For example, float windows based plugins like NeoZoom.lua or detour.nvim.

A windows-list option is added to supply these scenarios. Its default value is much like the original code: all windows except unfocusable windows. It's allowing user jump between float windows, but not the windows cannot be focus to, which are used a lot by incline.nvim.

@henry-hsieh
Copy link
Author

Another option is to move unfocusable windows back to the valid_win checks if we don't want unfoucusable windows to be moved to.

@smoka7
Copy link
Owner

smoka7 commented Apr 20, 2024

Another option is to move unfocusable windows back to the valid_win checks if we don't want unfoucusable windows to be moved to

Since we have excluded_filetypes, windows_list seems a bit redundant. Filtering unfocusable windows is a good idea. I think we should do this instead.

@henry-hsieh
Copy link
Author

The reason why I want to add this option is that detour.nvim actually create several float windows on top of themselves. They all have the same filetype, but only the top window is where I want to jump to. It's may only useful when filetype cannot distinguish jump window.

@smoka7
Copy link
Owner

smoka7 commented Apr 21, 2024

Okay, it looks good to me. If you're done with it, I'm going to merge it.

@henry-hsieh
Copy link
Author

I have finished the PR. You can merge it now. Thanks!

@smoka7 smoka7 merged commit 059e88e into smoka7:master Apr 21, 2024
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.

2 participants