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

Add compatibility mode for Vertico #3

Merged
merged 1 commit into from
Jul 31, 2022
Merged

Add compatibility mode for Vertico #3

merged 1 commit into from
Jul 31, 2022

Conversation

axelf4
Copy link
Owner

@axelf4 axelf4 commented May 28, 2022

This pull request adds a compatibility mode for the Vertico completion system that sets it up to lazily apply highlighting to Hotfuzz completions.

This is motivated by a desire to reach feature parity between Vertico and Selectrum, due to the potentiality of Selectrum being sunset, see minad/vertico#237.

Do you have any thoughts on this @minad? Advicing foreign functions in library code is something I would rather avoid, but here I think the utility outweighs the trouble of possible breakages caused by any future Vertico updates.

Also relevant to #2.

@codecov
Copy link

codecov bot commented May 28, 2022

Codecov Report

Merging #3 (ac49577) into master (7f8f351) will decrease coverage by 14.88%.
The diff coverage is 0.00%.

❗ Current head ac49577 differs from pull request most recent head 8b1676d. Consider uploading reports for the commit 8b1676d to get more accurate results

@@             Coverage Diff             @@
##           master       #3       +/-   ##
===========================================
- Coverage   90.32%   75.43%   -14.89%     
===========================================
  Files           1        1               
  Lines          93      114       +21     
===========================================
+ Hits           84       86        +2     
- Misses          9       28       +19     
Impacted Files Coverage Δ
hotfuzz.el 75.43% <0.00%> (-14.89%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us.

@minad
Copy link

minad commented May 28, 2022

The advice is okay, since I use the same in Vertico. See https://github.com/minad/vertico/blob/e5935b5bbfc0d820c54ed1ad52e36e8c48248fd7/vertico.el#L266-L302. In the future we may upstream the filtering/highlighting separation to Emacs itself, but the last time I tried the efforts have stalled. Technically the completion styles already perform filtering and highlighting separately, it is just not exposed by the completion-all-completions API. vertico--all-completions kind of fixes this.

@axelf4 axelf4 merged commit 5ccab77 into master Jul 31, 2022
@axelf4 axelf4 deleted the vertico-integration branch July 31, 2022 09:34
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.

2 participants