Closed Colonial-Dev closed 9 months ago
Thanks for your comment. I think this query is not used anywhere. It is just for us that we make sure to provide a query for all of the keywords of the parser.
However, the regex for numbers has been changed recently and probably needs to be updated in the respective downstream packages (e.g. nvim-treesitter, helix...)
I think this query is not used anywhere.
I actually use it in my library Inkjet :sweat_smile: I stumbled upon this issue while writing some integration tests for it.
Since this grammar bills itself as targeted at tree-sitter
rather than (say) Neovim, I think the highlighting queries should be maximally compatible if they're provided.
fixed by #225
Thanks a bunch!
Specifically, the rules for matching literal numbers and floats.
As far as I'm aware,
lua-match
is exclusive to Neovim's implementation oftree-sitter
based syntax highlighting. This means that highlighting numeric literals will silently fail when using something like the standardtree-sitter-highlight
package.I think changing them to use
match
with these regexes should work the same way. However, I've never created atree-sitter
grammar, so I figured it would be best left to your discretion.^\d+$
for integers.^[-]?\d*\.\d*$
for floats.These worked fine when tested in Rustexp.