playground icon indicating copy to clipboard operation
playground copied to clipboard

Highlight arbitrary capture groups like those defined by "make-range!"

Open IndianBoy42 opened this issue 4 years ago • 1 comments

I am trying to create new queries for treesitter-textobjects, which uses "make-range!" a lot of creating the .outer variant of text objects

Unfortunately afaict there is no way of highlighting those groups to see what they are capturing, only capture groups defined by @ can be highlighting.

Please correct me if I'm wrong, otherwise I think this would be a very useful feature to add

IndianBoy42 avatar Jul 16 '21 09:07 IndianBoy42

This should be fairly straight forward to visualize. make-range! has partly be replaced by the ranges that are used in Neovim core for injections. In general the preprocessing function that nvim-treesitter-textobject uses is fairly slow and we should gradually upgrade to use the Neovim-core query function only. It might still be useful to visualize the old meta data.

theHamsta avatar Jul 16 '21 09:07 theHamsta