helix icon indicating copy to clipboard operation
helix copied to clipboard

Reverse query precedence ordering

Open the-mikedavis opened this issue 6 months ago • 3 comments

This is a work in progress: we need to check the other tree-sitter queries (injections, indents, textobjects) and ensure that they also use the latest match. We also need to re-order and check all of the existing highlight queries. For now I've started small and only ported over Erlang's highlights.

Closes https://github.com/helix-editor/helix/issues/9436

the-mikedavis avatar Jan 28 '24 19:01 the-mikedavis

dump question: couldn't we simply write a script that reads all queries and reverses all lines?

It would be ugly but at least trivially correct.

pascalkuthe avatar Jan 28 '24 22:01 pascalkuthe

It would probably be a little tricky to write so that it handles comments correctly but yeah that would be the most efficient way

the-mikedavis avatar Jan 28 '24 23:01 the-mikedavis

There's also files that were copied and weren't properly reversed in the first place

archseer avatar Jan 29 '24 04:01 archseer

I added a progress checklist to the PR description. I'm going through these one by one and comparing them to the nvim-treesitter ordering: in many cases there's nothing to do or the file wasn't correctly reordered in the first place.

archseer avatar May 20 '24 10:05 archseer