From 81295eb0c5fc05ab3796a28c9f160c3ac4098106 Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Fri, 3 Apr 2026 01:43:28 -0700 Subject: feat(parsers): add jjdescription (#8625) --- runtime/queries/jjdescription/highlights.scm | 42 ++++++++++++++++++++++++++++ runtime/queries/jjdescription/injections.scm | 6 ++++ 2 files changed, 48 insertions(+) create mode 100644 runtime/queries/jjdescription/highlights.scm create mode 100644 runtime/queries/jjdescription/injections.scm (limited to 'runtime') diff --git a/runtime/queries/jjdescription/highlights.scm b/runtime/queries/jjdescription/highlights.scm new file mode 100644 index 000000000..7c87c08be --- /dev/null +++ b/runtime/queries/jjdescription/highlights.scm @@ -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 diff --git a/runtime/queries/jjdescription/injections.scm b/runtime/queries/jjdescription/injections.scm new file mode 100644 index 000000000..538383a3d --- /dev/null +++ b/runtime/queries/jjdescription/injections.scm @@ -0,0 +1,6 @@ +((comment_content) @injection.content + (#set! injection.language "comment")) + +((rest) @injection.content + (#lua-match? @injection.content "^diff") + (#set! injection.language "diff")) -- cgit v1.3.1