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

Use an AsyncHook for picker preview highlighting #9638

Closed
wants to merge 1 commit into from

Conversation

the-mikedavis
Copy link
Member

The picker previously used the IdleTimeout event as a trigger for syntax-highlighting the currently selected document in the preview pane. This is a bit ad-hoc now that the event system has landed and we can refactor towards an AsyncHook (like those used for LSP completion and signature-help). This should resolve some odd scenarios where the preview did not highlight because of a race between the idle timeout and items appearing in the picker.

Connects #9629
Fixes #4956

@the-mikedavis the-mikedavis added C-enhancement Category: Improvements A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Feb 15, 2024
The picker previously used the IdleTimeout event as a trigger for
syntax-highlighting the currently selected document in the preview pane.
This is a bit ad-hoc now that the event system has landed and we can
refactor towards an AsyncHook (like those used for LSP completion and
signature-help). This should resolve some odd scenarios where the
preview did not highlight because of a race between the idle timeout
and items appearing in the picker.
@the-mikedavis the-mikedavis force-pushed the picker/preview-highlight-hook branch from b57472f to 5afc6bf Compare February 15, 2024 23:30
@the-mikedavis
Copy link
Member Author

I've included this in #9647 so I will close in favor of that. (However this change could be ported out very easily if desired.) The only change on #9647 is that it's moved to a helix-term/src/ui/picker/handlers.rs file shared by the dynamic picker handler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No syntax highlighting in preview on global search
2 participants