This repo provides tree-sitter grammar for Rasperry Pi PIO assembly files (3.3. Using PIOASM, the PIO Assembler) files.
In addition to the grammar, the following queries are provided:
| Query file | Description |
|---|---|
| highlights.scm | Syntax highlighting |
| injections.scm | Injection queries for comments and C/Python code blocks |
| rainbows.scm | Rainbow brackets for expressions |
| tags.scm | Tags for .program, .define statements and labels |
| textobjects.scm | Incremental selection for statements, instructions, labels and code blocks |
Example usage with Helix
Add this to ~/.congig/helix/languages.toml.
[[language]]
comment-tokens = ";"
file-types = ["pio"]
name = "pio"
scope = "source.pio"
[[grammar]]
name = "pio"
[grammar.source]
git = "https://github.com/nmetschke/tree-sitter-pio"
rev = "bc094f6df53f4311468ded14be1c37e8dfdc601c"and run hx --grammar fetch && hx --grammar build.
Some more usage options with Nix and Helix can be found here at my PIO LSP Server.