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

Feature request: use floating/popup window to display ctrlp #567

Open
lucc opened this issue Mar 25, 2021 · 1 comment
Open

Feature request: use floating/popup window to display ctrlp #567

lucc opened this issue Mar 25, 2021 · 1 comment

Comments

@lucc
Copy link

lucc commented Mar 25, 2021

Neovim has floating windows and vim has popup windows. It would be nice to support these. I.e the variable ctrlp_match_window would support a new position float which would result in a floating window in the middle of the screen being used instead of the current layout.

Advantage:

It does not disturb the current window layout visually because the floating window is layered over the split windows.

@brandon1024
Copy link

Supporting popups in an agnostic way is a bit challenging because the APIs for vim and neovim are different. We ran into something similar in the Fern plugin (here). Also, popup windows are a relatively new feature added in Vim 8 and ctrlp is advertised as working for Vim 7+ so we'd be breaking that contract.

It might be worth discussing creating a config option for defining a custom results window opener function. Rather than supporting floating windows directly in the plugin, users could use this opener callback option to create the window themselves. I don't know how much work would would be involved in supporting something like this.

@mattn what are your thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants