aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/edoc/highlights.scm
diff options
context:
space:
mode:
authorMichael Davis2022-06-02 23:41:17 +0000
committerGitHub2022-06-02 23:41:17 +0000
commit42d780b1037f36bd37e2a8dc40b5e9bb95fb5be7 (patch)
treea09f476a2f9dfd77714d1deeb62d4542d215525f /runtime/queries/edoc/highlights.scm
parent4f3d0a77064aac18cc4386df5c43c312c3b03f69 (diff)
add tree-sitter-edoc (#2640)
* add tree-sitter-edoc * fix escape character capture in markdown queries * add field negation operator "!" to tsq highlights
Diffstat (limited to 'runtime/queries/edoc/highlights.scm')
-rw-r--r--runtime/queries/edoc/highlights.scm50
1 files changed, 50 insertions, 0 deletions
diff --git a/runtime/queries/edoc/highlights.scm b/runtime/queries/edoc/highlights.scm
new file mode 100644
index 00000000..3a309960
--- /dev/null
+++ b/runtime/queries/edoc/highlights.scm
@@ -0,0 +1,50 @@
+((section
+ (section_marker) @markup.heading.marker
+ (section_content) @markup.heading.1
+ (section_marker) @markup.heading.marker)
+ (#eq? @markup.heading.marker "=="))
+
+((section
+ (section_marker) @markup.heading.marker
+ (section_content) @markup.heading.2
+ (section_marker) @markup.heading.marker)
+ (#eq? @markup.heading.marker "==="))
+
+((section
+ (section_marker) @markup.heading.marker
+ (section_content) @markup.heading.3
+ (section_marker) @markup.heading.marker)
+ (#eq? @markup.heading.marker "===="))
+
+(macro (tag) @function.macro)
+(tag) @keyword
+(macro_escape) @constant.character.escape
+(inline_quote) @markup.raw.inline
+(email_address) @markup.link.url
+
+(em_xhtml_tag
+ (open_xhtml_tag) @tag
+ (xhtml_tag_content) @markup.italic
+ (close_xhtml_tag) @tag)
+
+(strong_xhtml_tag
+ (open_xhtml_tag) @tag
+ (xhtml_tag_content) @markup.bold
+ (close_xhtml_tag) @tag)
+
+(module) @namespace
+(function) @function
+(type) @type
+
+; could be @constant.numeric.integer but this looks similar to a capture
+(arity) @operator
+
+[":" "/"] @operator
+["(" ")"] @punctuation.delimiter
+["{" "}"] @function.macro
+
+[
+ (quote_marker)
+ (language_identifier)
+ (quote_content)
+] @markup.raw.block