-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
Create custom company tooltips #1012
Comments
I'd be very happy to see someone implement this. ;-) It would entail extracting the popup rendering feature into a library. Preferably one that has some feature parity with popup.el (including the creation of multiple popups at the same time). I'm not sure how well it will work with the one-overlay approach we have chosen here (as opposed to popup.el's one-overlay-per-line), but someone would have to experiment with that. |
Separating this out into a separate package would be great. Would you prefer to maintain it if company would depend on it? I wouldn't like to take over responsibility for that currently. Now that I know you would be interested in this I might give it a whirl next time I feel like it. I will post here if I come up with something that looks promising. Multiple popups would be a great feature! I currently use pos-tip.el to show eldoc messages above the current line and in the past used popup.el for that but both have their problems. |
Yes, of course. It's not a hard requirement, but I would prefer it.
Sounds good. Thanks in advance.
Right. There are no perfect solutions currently. And we basically only need two: one for the graphical mode (preferably faster than the child frame based solutions are working now, but hopefully we'll just see their performance improved in later versions of Emacs) and another for the terminal. |
The benefits of child frames are that their display can overlap with other Emacs UI elements like window margins and mode line right? I would be okay with that limitation and prefer the overlay approach but maybe the library should ideally cover both cases and have an option to default to child frames in graphical Emacs and overlays in terminal Emacs. |
Also: work with different fonts sizes in the buffer, non-monospace fonts, and without covering the line numbers on the affected lines.
To start with, it could have an API roughly compatible with the posframe package. Then we'll see about dispatching to it later. |
Ah yes, thanks.
Sounds like a good approach. |
Someone on reddit posted an example to create menus which overlap window boundaries for tty, I had no idea that is possible, commenting here for later reference: (x-popup-menu `((,(- (/ (frame-width) 2) 10) ,(frame-height)) ,(selected-frame))
(easy-menu-create-menu
"Testing"
`(["some testing 1" next-line]
["some testing 2" previous-line]))) |
As far as I know there is no package which allows creating company like overlay tooltips. I often want to display info windows in the same way company does it. Ideally I would like to do something like:
(show-tooltip "string" position) .... (hide-tooltip)
The closest I could find is quick-peek but I don't like how it inserts the info text between the already present text and would really prefer a company like overlay display which hides any present text behind the overlay text. Company seems to have a battle tested implementation of this functionality which would be great to be able to access. What do you think?
The text was updated successfully, but these errors were encountered: