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

Improvements upon eldoc box behavior #21

Closed
andreyorst opened this issue Oct 2, 2019 · 10 comments
Closed

Improvements upon eldoc box behavior #21

andreyorst opened this issue Oct 2, 2019 · 10 comments

Comments

@andreyorst
Copy link

This plugin is now the definitive way of using eldoc for me. But I think it can be improved further a bit.

First of, now popup moves as long as we type text, or move with directional shortcuts. This is nice when typing and really annoying when moving around the code, because box closes most of the code below the cursor, even when you've moved to a different location, where the popup no longer makes sense.

I think it is logical to make eldoc box follow the cursor only on typing events, eg when modifying text in any way, and quickly disappear if we leaving the line on which it was displayed. Also hiding eldoc-box by using C-g would be nice addition.

Another thing that's bothers me is that you have to enable two modes in order to make eldoc hover near the cursor:

(eldoc-box-hover-mode)
(eldoc-box-hover-at-point-mode)

Why can't we simply call one of those? One for hover mode, the other for hover at point mode.

@casouri
Copy link
Owner

casouri commented Oct 2, 2019

I think it is logical to make eldoc box follow the cursor only on typing events, eg when modifying text in any way, and quickly disappear if we leaving the line on which it was displayed. Also hiding eldoc-box by using C-g would be nice addition.

Good point! Btw at-point mode already have the C-g feature, it doesn’t work?

One for hover mode, the other for hover at point mode.

Good idea.

@casouri
Copy link
Owner

casouri commented Oct 2, 2019

I do have the intention to improve the responsiveness of Eldoc-box, but I don’t have time right now. That is a long-term goal.

casouri added a commit that referenced this issue Oct 3, 2019
casouri added a commit that referenced this issue Oct 3, 2019
@casouri
Copy link
Owner

casouri commented Oct 3, 2019

Try this branch and see if there's a problem or space for improvement.

What you should see is moving point now hides childframe and typing keep the display in eldoc-box-hover-at-point-mode.

Also the two modes are not exclusive independent modes.

casouri added a commit that referenced this issue Oct 3, 2019
at-point-mode no longer stack on top of hover-mode.
Instead, they stands as two exclusive modes,
enabling any one of them disables the other.
casouri added a commit that referenced this issue Oct 3, 2019
@andreyorst
Copy link
Author

andreyorst commented Oct 3, 2019

I've tried this branch and it seem to work smooth and slick! I've noticet this bug though, but I suspect that this is because I'm on gnome:

image

eldoc-box is displayed above company. Gonna try this on a different WM to make sure.

@andreyorst
Copy link
Author

No, this reproduces in xfce4. I guess I was to early on #15

casouri added a commit that referenced this issue Oct 3, 2019
@casouri
Copy link
Owner

casouri commented Oct 3, 2019

I can't reproduce on KDE plasma. Could you try reproduce it with minimal config? I.e., emacs -q and only load company and eldoc-box.

@andreyorst
Copy link
Author

Weird, but I also can't reproduce it with the minimal configuration..

@casouri
Copy link
Owner

casouri commented Oct 3, 2019

That’s means your config has some culprit in it :)

@andreyorst
Copy link
Author

Seems so. I have no complains so if you satisfied with the changes and code I think this is fixed and can be merged

@casouri
Copy link
Owner

casouri commented Oct 8, 2019

I don't see problems, now it's pushed.

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

No branches or pull requests

2 participants