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 built-in CurSearch highlight group when available #22

Open
damnskippy opened this issue Jul 24, 2022 · 1 comment
Open

Use built-in CurSearch highlight group when available #22

damnskippy opened this issue Jul 24, 2022 · 1 comment

Comments

@damnskippy
Copy link

Just a quick note about the relatively new highlight group:
https://vimhelp.org/syntax.txt.html#hl-CurSearch

Seems this is one of the loupe functionalities that is now natively built in. Not sure if it helps cut down anything as a result (maybe not in order to support older vim versions), or if it optimizes or speeds up anything in newer vim versions.
I continue using loupe#hlmatch() as a long time user and beneficiary of loupe, but thought I'd pop a note here in case.
Thank you.

@wincent
Copy link
Owner

wincent commented Jul 24, 2022

Thanks for the pointer, @damnskippy!

This looks relatively recent (vim/vim@a439938) so it's not in the version of macOS that I currently use (Monterey 12.4):

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 19 2022 21:41:43)
macOS version - x86_64
Included patches: 1-4113
Compiled by [email protected]

Nor in the version that I compiled a while back with Homebrew:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 16 2022 17:51:47)
macOS version - x86_64
Included patches: 1-4400
Compiled by Homebrew

Nor in my build of Neovim, which I should probably update 😬...

NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

After updating, I see the Neovim version of the change (neovim/neovim#18081) is not in a released build yet, so I guess we'll get it in v0.8.0:

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

So it might be a while before this is extensively available, but you're right: Loupe will probably maintain the old code path for a while so that people on older builds can still benefit, but it does make sense to leverage the new functionality whenever it is available.

@wincent wincent changed the title CurSearch native built in Use built-in CurSearch highlight group when available Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants