hx/prr: prr syntax highlighting
This commit is contained in:
parent
2d62517a51
commit
9b40fe5b92
2 changed files with 36 additions and 0 deletions
|
|
@ -60,3 +60,14 @@ roots = [ ".zk" ]
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "lua"
|
name = "lua"
|
||||||
formatter = { command = "stylua", args = [ "-" ] }
|
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" }
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue