feat: jjdescription parser and queries

This commit is contained in:
Riley Bruins 2026-04-01 23:01:05 -07:00
parent c82bf96f0a
commit f5dedd0e1a
4 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,42 @@
[
(comment)
(generated_comment)
] @comment
(comment_content) @spell
(subject) @markup.heading
(type) @keyword
(scope) @variable.parameter
(change_id) @constant
(filepath) @string.special.path
((rest) @comment
(#not-lua-match? @comment "^diff"))
"JJ: ignore-rest" @keyword.directive
[
"("
")"
] @punctuation.bracket
":" @punctuation.delimiter
"!" @punctuation.special
[
"A"
"C"
] @diff.plus
"D" @diff.minus
[
"M"
"R"
] @diff.delta

View file

@ -0,0 +1,6 @@
((comment_content) @injection.content
(#set! injection.language "comment"))
((rest) @injection.content
(#lua-match? @injection.content "^diff")
(#set! injection.language "diff"))