PIOASM syntax highlighting not working when using tree-sitter-pioasm
.
#13720
-
I'm trying to get syntax highlighting on Here's what I tried in my [[language]]
name = "pioasm"
scope = "source.pioasm"
file-types = ["pio", "pioasm"]
indent = { tab-width = 4, unit = " " }
comment-tokens = ";"
[[grammar]]
name = "pioasm"
source = { git = "https://github.com/leo60228/tree-sitter-pioasm", rev = "afece58efdb30440bddd151ef1347fa8d6f744a9" } Then I built Helix from source. I saw Here's a basic file that should have syntax highlighting when named e.g. .program main
loop:
in pins 1
mov osr, isr
push
jmp loop My Helix version, if that's relevant:
Relevant links: https://github.com/leo60228/tree-sitter-pioasm |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Will you try and run After that, will you run |
Beta Was this translation helpful? Give feedback.
-
I tried
|
Beta Was this translation helpful? Give feedback.
-
Ok, it seems that you have the grammar around just fine. What it looks like is missing is a Writing highlight queries can be a bit tricky at first, but it's mostly just labeling the different parts with the appropriate names. Hopefully that gives you a direction to go in to get highlighting. Let me know if there's anything you need! |
Beta Was this translation helpful? Give feedback.
Ok, it seems that you have the grammar around just fine. What it looks like is missing is a
highlights.scm
file. In$HELIX_RUNTIME/queries
, make a directory calledpioasm
and in that directory, add a file calledhighlights.scm
.Writing highlight queries can be a bit tricky at first, but it's mostly just labeling the different parts with the appropriate names.
Here is tree-sitter's guide to writing these highlight queries.
Here is Helix's list of highlight names.
Lastly, here is the highlight queries we currently use for nasm which can be some inspiration for you.
Hopefully that gives you a direction to go in to get highlighting. Let me know if there's anything you need!