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/nickel/highlights.scm | 74 +++++++++++++++++++++++++++++++++++ runtime/queries/nickel/indents.scm | 13 ++++++ runtime/queries/nickel/injections.scm | 2 + 3 files changed, 89 insertions(+) create mode 100644 runtime/queries/nickel/highlights.scm create mode 100644 runtime/queries/nickel/indents.scm create mode 100644 runtime/queries/nickel/injections.scm (limited to 'runtime/queries/nickel') diff --git a/runtime/queries/nickel/highlights.scm b/runtime/queries/nickel/highlights.scm new file mode 100644 index 000000000..07673d797 --- /dev/null +++ b/runtime/queries/nickel/highlights.scm @@ -0,0 +1,74 @@ +(comment) @comment @spell + +[ + "forall" + "in" + "let" + "default" + "doc" + "rec" +] @keyword + +"fun" @keyword.function + +"import" @keyword.import + +[ + "if" + "then" + "else" +] @keyword.conditional + +"match" @keyword.conditional + +(types) @type + +"Array" @type.builtin + +; BUILTIN Constants +(bool) @boolean + +"null" @constant.builtin + +(num_literal) @number + +(infix_op) @operator + +(type_atom) @type + +(enum_tag) @variable + +(chunk_literal_single) @string + +(chunk_literal_multi) @string + +(str_esc_char) @string.escape + +[ + "{" + "}" + "(" + ")" + "[|" + "|]" +] @punctuation.bracket + +(multstr_start) @punctuation.bracket + +(multstr_end) @punctuation.bracket + +(interpolation_start) @punctuation.bracket + +(interpolation_end) @punctuation.bracket + +(record_field) @variable.member + +(builtin) @function.builtin + +(fun_expr + pats: (pattern_fun + (ident) @variable.parameter)) + +(applicative + t1: (applicative + (record_operand) @function)) diff --git a/runtime/queries/nickel/indents.scm b/runtime/queries/nickel/indents.scm new file mode 100644 index 000000000..8c6f740d9 --- /dev/null +++ b/runtime/queries/nickel/indents.scm @@ -0,0 +1,13 @@ +[ + (atom + (uni_record)) ; for {...} + (atom + terms: (term)) ; for [...] +] @indent.begin + +[ + "]" + "}" +] @indent.end @indent.branch + +(comment) @indent.auto diff --git a/runtime/queries/nickel/injections.scm b/runtime/queries/nickel/injections.scm new file mode 100644 index 000000000..2f0e58eb6 --- /dev/null +++ b/runtime/queries/nickel/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) -- cgit v1.2.3-70-g09d2