Use built-in `CurSearch` highlight group when available
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.
Thanks for the pointer, @damnskippy!
This looks relatively recent (https://github.com/vim/vim/commit/a43993897aa372159f682df37562f159994dc85c) 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 (https://github.com/neovim/neovim/pull/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.