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: add multiple_hover config option #59

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

Conversation

AThePeanut4
Copy link
Contributor

@AThePeanut4 AThePeanut4 commented Apr 30, 2024

This adds a multiple_hover config option to configure what happens when hover() is called while a popup window is already open. This allows for a solution to #49 while retaining the current behaviour of cycling providers for those that prefer that. It is also once again possible to move the popup to a preview_window by using this option.

Also, when hover() is called while the cursor is inside the popup window, it will always cycle the providers.

I ended up rewriting a fair bit of the main popup logic while fixing a bunch of corner-case issues I found, I'd like to think it's simpler now than it was before. If you need explanations for why I made some specific change then feel free to ask.

The close() function no longer requires a bufnr argument, which I believe means #36 can be closed. This is possible because the winid of the popup window is now stored in a Lua "global" variable rather than in a Vim buffer-local variable. It was never really possible for multiple hover popups to be open simultaneously anyway.

And then I've added an .editorconfig file and formatted everything so that the indentation and ' usage is consistent. I'm happy to split that into another PR or revert it completely if needed.

Resolves #19
Resolves #36
Resolves #49
Resolves #64
Resolves #65

@AThePeanut4
Copy link
Contributor Author

@lewis6991 I understand this is a large PR, and would be non-trivial to review, but do you plan on merging it at some point? If the feature is not something you are interested in adding, that's also perfectly fine - I'd just like to know.

@lewis6991
Copy link
Owner

This PR is unreviewable and contains lots of unrelated changes so I don't plan on merging.

@AThePeanut4
Copy link
Contributor Author

@lewis6991 Thank you for letting me know.

If I split it up into many small commits, would that help? Or do you want multiple PRs?

Or would you not merge either way? I don't want to waste my time unnecessarily.

Thanks

@lewis6991
Copy link
Owner

Multiple PRs please. I haven't got time to review big changes. Haven't decided whether to merge the main change without reviewing first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants