From 9b40fe5b9261bfa104c1516822eedc58825c8594 Mon Sep 17 00:00:00 2001 From: Matthew Ryan Dillon Date: Mon, 8 Dec 2025 16:12:17 -0500 Subject: [PATCH] hx/prr: prr syntax highlighting --- .../helix/languages.toml.tmpl | 11 ++++++++ .../queries/prr/private_highlights.scm | 25 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 home/private_dot_config/helix/runtime/queries/prr/private_highlights.scm diff --git a/home/private_dot_config/helix/languages.toml.tmpl b/home/private_dot_config/helix/languages.toml.tmpl index 7938d01..aef7a90 100644 --- a/home/private_dot_config/helix/languages.toml.tmpl +++ b/home/private_dot_config/helix/languages.toml.tmpl @@ -60,3 +60,14 @@ roots = [ ".zk" ] [[language]] name = "lua" formatter = { command = "stylua", args = [ "-" ] } + +[[language]] +name = "prr" +scope = "source.prr" +file-types = ["prr"] +roots = [] +comment-token = "#" + +[[grammar]] +name = "prr" +source = { path = "~/.local/share/tree-sitter-prr" } diff --git a/home/private_dot_config/helix/runtime/queries/prr/private_highlights.scm b/home/private_dot_config/helix/runtime/queries/prr/private_highlights.scm new file mode 100644 index 0000000..a1fd4fb --- /dev/null +++ b/home/private_dot_config/helix/runtime/queries/prr/private_highlights.scm @@ -0,0 +1,25 @@ +; PRR syntax highlighting for Helix + +; Diff additions and deletions +(addition) @diff.plus +(deletion) @diff.minus + +; File headers +(old_file) @diff.minus +(new_file) @diff.plus + +; Diff metadata +(diff_header) @keyword +(index_line) @comment +(chunk_header) @attribute + +; Context lines (unchanged diff lines) +(context_line) @comment + +; PRR tag components +(tag_name) @keyword +(action) @string +(tag_content) @comment + +; User comments +(comment_line) @comment