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/ebnf/highlights.scm | 42 +++++++++++++++++++++++++++++++++++++ runtime/queries/ebnf/injections.scm | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 runtime/queries/ebnf/highlights.scm create mode 100644 runtime/queries/ebnf/injections.scm (limited to 'runtime/queries/ebnf') diff --git a/runtime/queries/ebnf/highlights.scm b/runtime/queries/ebnf/highlights.scm new file mode 100644 index 000000000..4254d04dd --- /dev/null +++ b/runtime/queries/ebnf/highlights.scm @@ -0,0 +1,42 @@ +; Simple tokens ;;;; +(terminal) @string + +(special_sequence) @string.special + +(integer) @number + +(comment) @comment @spell + +; Identifiers ;;;; +; Allow different highlighting for specific casings +((identifier) @type + (#lua-match? @type "^%u")) + +((identifier) @string.special.symbol + (#lua-match? @string.special.symbol "^%l")) + +((identifier) @constant + (#lua-match? @constant "^%u[%u%d_]+$")) + +; Punctuation ;;;; +[ + ";" + "," +] @punctuation.delimiter + +[ + "|" + "*" + "-" +] @operator + +"=" @keyword.operator + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket diff --git a/runtime/queries/ebnf/injections.scm b/runtime/queries/ebnf/injections.scm new file mode 100644 index 000000000..2f0e58eb6 --- /dev/null +++ b/runtime/queries/ebnf/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) -- cgit v1.2.3-70-g09d2