ctrlpvim / ctrlp.vim

Active fork of kien/ctrlp.vim—Fuzzy file, buffer, mru, tag, etc finder.
ctrlpvim.github.com/ctrlp.vim
Other
5.55k stars 260 forks source link

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

Open lucc opened 3 years ago

lucc commented 3 years ago

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 commented 5 months ago

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?