tree-sitter-c3 icon indicating copy to clipboard operation
tree-sitter-c3 copied to clipboard

Helix Editor highlights fail to compile

Open CM-IV opened this issue 6 months ago • 2 comments

Selecting the main.c3 file in a newly initialized project does not highlight the code, and this error pops up in the log when fuzzy searching for .c3 files. I am using latest versions of tree-sitter-c3 and c3-lsp with queries and indents copied over in the helix runtime directory:

╰─ tail --follow ~/.cache/helix/helix.log

2025-06-11T04:27:59.669 helix_core::syntax [ERROR] Failed to compile highlights for 'c3': unknown property 'priority'
  --> 397:10
     |
 396 |   ] @variable.parameter
 397 |   (#set! priority 110))
     |          ^^^^^^^^
     |

CM-IV avatar Jun 11 '25 09:06 CM-IV

Yeah unfortunately the query files are incompatible with Helix. I suspect a new set of query files have to be made for Helix specifically. I can look into it when I have some spare time, but I don't use Helix personally.

cbuttner avatar Jun 12 '25 15:06 cbuttner

I made a fork with the changes, highlights seem to be working now. Probably breaks them for NeoVim though https://github.com/c3lang/tree-sitter-c3/compare/main...CM-IV:tree-sitter-c3:main

Image

CM-IV avatar Jun 15 '25 13:06 CM-IV