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

feat: new command to open hover documentation in a new buffer instead of a popup #12208

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

NikitaRevenco
Copy link
Contributor

@NikitaRevenco NikitaRevenco commented Dec 6, 2024

So, you can use Space + k to hover documentation which opens a popup.

However, sometimes it's really useful to be able to search inside this popup. Or go into it, move around, copy some text, etc. Some hover-docs can be quite long.

This PR adds a new command called hover_dump, which dumps the "documentation on hover" into a new scratch buffer, where you can use your usual Helix motions. this is how it looks like (window on the right):

image

The red box is where my cursor was, and it opened the documentation in a new buffer instead of a popup.

I bound hover_dump to Space + K, whereas hover was Space + k.

Closes #12206
Closes #8134
Closes #9455

@Axlefublr
Copy link
Contributor

trying this feature out in my fork and loving it!

except, I'd rather it be a horizontal split. I could also see an argument for ::Replace, too
is it too unreasonable to ask for this to be configurable via a settable option?
I don't think helix decides on a split type anywhere else; maybe having a global "split-direction" option that other things may potentially use in the future is a good idea

@NikitaRevenco
Copy link
Contributor Author

trying this feature out in my fork and loving it!

except, I'd rather it be a horizontal split. I could also see an argument for ::Replace, too is it too unreasonable to ask for this to be configurable via a settable option? I don't think helix decides on a split type anywhere else; maybe having a global "split-direction" option that other things may potentially use in the future is a good idea

Adding configuration for this small thing is easily going to be rejected by the maintainers. Other adjustments would also be increasing complexity and could delay this PR from being merged

@Axlefublr
Copy link
Contributor

fair enough. let's get this merged first
good luck!

@TornaxO7
Copy link
Contributor

TornaxO7 commented Dec 31, 2024

trying this feature out in my fork and loving it!

except, I'd rather it be a horizontal split. I could also see an argument for ::Replace, too is it too unreasonable to ask for this to be configurable via a settable option? I don't think helix decides on a split type anywhere else; maybe having a global "split-direction" option that other things may potentially use in the future is a good idea

What you can also do, at least, if you are working with one pane, is transposing your layout with <C-w><C-t>.

@Axlefublr
Copy link
Contributor

@TornaxO7 yep thank you! I am aware
for now I changed it to horizontal in source in my fork; it's just a defaults preference

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

Successfully merging this pull request may close these issues.

Entering the Popup Documentation Window (to select text etc.)
3 participants