From 692b051b09935653befdb8f7ba8afdb640adf17b Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 12 Jun 2023 09:54:30 -0600 Subject: feat!: drop modules, general refactor and cleanup --- runtime/queries/regex/highlights.scm | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 runtime/queries/regex/highlights.scm (limited to 'runtime/queries/regex') diff --git a/runtime/queries/regex/highlights.scm b/runtime/queries/regex/highlights.scm new file mode 100644 index 000000000..350d1d0f3 --- /dev/null +++ b/runtime/queries/regex/highlights.scm @@ -0,0 +1,53 @@ +; Forked from tree-sitter-regex +; The MIT License (MIT) Copyright (c) 2014 Max Brunsfeld +[ + "(" + ")" + "(?" + "(?:" + "(?<" + "<" + ">" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +(group_name) @property + +; These are escaped special characters that lost their special meaning +; -> no special highlighting +(identity_escape) @string.regexp + +(class_character) @constant + +(decimal_digits) @number + +[ + (control_letter_escape) + (character_class_escape) + (control_escape) + (boundary_assertion) + (non_boundary_assertion) +] @string.escape + +[ + "*" + "+" + "?" + "|" + "=" + "!" + "-" + "\\k" + (lazy) +] @operator + +[ + (start_assertion) + (end_assertion) + "," +] @punctuation.delimiter + +(any_character) @variable.builtin -- cgit v1.2.3-70-g09d2