Skip to content

fix(hover): use left token when cursor is before '.', ':', '[', ']' #692

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

Merged
merged 1 commit into from
Aug 7, 2025

Conversation

skewb1k
Copy link
Contributor

@skewb1k skewb1k commented Aug 7, 2025

Fixes an issue with hover behavior on dot selectors. When the cursor was placed to the left of the dot (e.g., struct|.field), the hover would incorrectly show information for the field and highlight the dot token.

Before/After:
1754560858_screenshot
1754560904_screenshot

@xuhuanzy
Copy link
Member

xuhuanzy commented Aug 7, 2025

You need to write a test for this to ensure correct execution.

@skewb1k
Copy link
Contributor Author

skewb1k commented Aug 7, 2025

Added test. Fails on main, passes with the fix.

@skewb1k skewb1k changed the title fix(hover): use left token when cursor is before dot fix(hover): use left token when cursor is before '.', ':', '[', ']' Aug 7, 2025
@CppCXY CppCXY merged commit 88e723d into EmmyLuaLs:main Aug 7, 2025
21 checks passed
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.

3 participants