minad / corfu

:desert_island: corfu.el - COmpletion in Region FUnction
GNU General Public License v3.0
1.15k stars 43 forks source link

User-customizable above/below frame positioning #303

Closed tylerjl closed 1 year ago

tylerjl commented 1 year ago

Thank you so much for your work and this package!

When I'm using both corfu and a package that adds large overlays (my case is copilot.el), I found that the corfu frame covers the overlay when placed below. Here's an example of what it looks like:

image

I'm still an elisp novice so my initial reaction was to try and see whether I could just tweak the placement of the child frame to always appear above the point. In some cases this would make candidates go outside the parent frame (I think?) but regardless, I think that a configurable setting that signaled "force appearance above or below point" would solve this. It might behave oddly in some cases (like if you set "force appearance below" and the point was at the bottom of the frame) but the point is that you could alter it if you wanted to.

Is this capability something that would be worth adding or just extra cruft? Is there another approach here to both a) see the overlay and b) see completion candidates that I might not've considered that would be a better way to do it?

Thank you so much for the help!

minad commented 1 year ago

I am not enthusiastic about such a setting since it won't behave well if the point is at the top of the frame. My recommendation is to disable copilot or corfu temporarily if the other us active. It doesn't really make sense to show both at the same time.

MarselScheer commented 7 months ago

Just want to show how it is visualized in company-mode (using both company-pseudo-tooltip-frontend company-preview-frontend): image