Define custom patterns
Is it possible to define custom matching patterns similiar to the ones already existing? I'd like to use that plugin with some LaTeX documents I am working with, in particular with the xcolor package.
In the following example, I define four colors with hex values, which are not preceded by an hashtag character.
\definecolor{a}{HTML}{FF0000}
\definecolor{b}{HTML}{FFF000}
\definecolor{c}{HTML}{FFFF00}
\definecolor{d}{HTML}{FFFFF0}
I know there are easy workarounds, such as repeating the color at the end of the line as a comment, such as...
\definecolor{e}{HTML}{FFFFFF} % #FFFFFF
... But it could get me into this kind of situation pretty often.
% I forgot to change the comment as well
\definecolor{f}{HTML}{CCCFFF} % #FFFFFF
Despite I read through the documentation, I apologize in advance in case I missed something obvious.
There isn't a good solution for this.
An older version of this plugin allowed for this and instructions can be found at commit 8b1ff29c09e179ec4513c64f1ef0b23aacbe2343 and in the help file doc/hexokinase-v1.txt under the help tag deprecated-hexokinase-patterns. But it has been deprecated and not compatible with parts of the plugin in its current form. On top of that, it's a fully synchronous (and slow) version of the plugin. It'll still work, it just will be slow and only one version of the plugin can run at a time, the code still exists in the codebase, but the documentation was removed after the commit above.
Another option would be to fork github.com/RRethy/hexokinase and add a new pattern to the code (similar to this fork https://github.com/kaymmm/hexokinase), then this can be compiled and supplied to vim-hexokinase via g:Hexokinase_executable_path.
The last option isn't going to be ready for a while, but I'll probably be rewriting parts of this plugin in Lua which would open up for a lot more configuration. But this has no timeline and won't be for a while.