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

Improve hover support #38

Merged
merged 1 commit into from
Feb 11, 2024
Merged

Conversation

WillLillis
Copy link
Contributor

Hi! I was trying the project out of the test file and initially thought hover support wasn't implemented because I couldn't get a hover window on hx-target in the file's initial state. I then changed the hover support implementation before realizing that I just needed to provide a value for hx-target and close off the div.

This PR allows for hover functionality even when a div isn't closed off (and thus even when tree-sitter's CST of the buffer contains some errors near the cursor), as in the initial state of the test file. If this behavior isn't desired, I completely understand :). I'm still familiarizing myself with the codebase, so if I unwittingly made any goofy decisions I'm happy to fix/ refactor things as needed. Some demos:

Before:

htmxhoverbefore

After:

htmxhoverafter

@ThePrimeagen
Copy link
Owner

i think this makes sense, i'll go with it

@ThePrimeagen ThePrimeagen merged commit 0ad57f0 into ThePrimeagen:master Feb 11, 2024
3 checks passed
@WillLillis WillLillis deleted the hover_support branch February 11, 2024 16:26
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.

None yet

2 participants