diff options
author | Clément Delafargue | 2023-01-13 10:29:40 +0000 |
---|---|---|
committer | Michael Davis | 2023-01-13 15:42:05 +0000 |
commit | 1f6809c9ce8f4b864b3754111b8673ca282f67f5 (patch) | |
tree | 9b50311cee66daf3d413ac0b42bef6b600544aa8 /runtime/queries | |
parent | 051cd786a43a84912413b526782adffa9698fcd9 (diff) |
Language support for dhall
https://dhall-lang.org/
Diffstat (limited to 'runtime/queries')
-rw-r--r-- | runtime/queries/dhall/highlights.scm | 52 | ||||
-rw-r--r-- | runtime/queries/dhall/textobjects.scm | 23 |
2 files changed, 75 insertions, 0 deletions
diff --git a/runtime/queries/dhall/highlights.scm b/runtime/queries/dhall/highlights.scm new file mode 100644 index 00000000..52ede310 --- /dev/null +++ b/runtime/queries/dhall/highlights.scm @@ -0,0 +1,52 @@ +;; Literals + +(integer_literal) @constant.numeric.integer +(natural_literal) @constant.numeric.integer +(double_literal) @constant.numeric.float +(boolean_literal) @constant.builtin.boolean +(text_literal) @string +(local_import) @string.special.path +(http_import) @string.special.url +(import_hash) @string + +;; Comments +[ + (line_comment) + (block_comment) +] @comment + +;; Keywords +[ + ("let") + ("in") + (assign_operator) + (type_operator) + (lambda_operator) + (arrow_operator) + (infix_operator) + (completion_operator) + ("using") + ("assert") + (assert_operator) + ("as") + (forall_operator) + ("with") +] @keyword + +;; Builtins +[ + (builtin_function) + (missing_import) +] @function.builtin + +[ + (builtin) + (import_as_text) +] @type.builtin + +;; Conditionals +[ + ("if") + ("then") + ("else") +] @keyword.control.conditional diff --git a/runtime/queries/dhall/textobjects.scm b/runtime/queries/dhall/textobjects.scm new file mode 100644 index 00000000..c840c758 --- /dev/null +++ b/runtime/queries/dhall/textobjects.scm @@ -0,0 +1,23 @@ +(lambda_expression + (label) @parameter.inside + (expression) @function.inside +) @function.around + +(forall_expression + (label) @parameter.inside + (expression) @function.inside +) @function.around + +(assert_expression + (expression) @test.inside +) @test.around + +[ + (block_comment_content) + (line_comment_content) +] @comment.inside + +[ + (block_comment) + (line_comment) +] @comment.around |