From 5ff2cb24e2ec5c8caf8972699e7ae69a15b710d1 Mon Sep 17 00:00:00 2001 From: Jummit Date: Sun, 19 Feb 2023 19:32:42 +0100 Subject: [PATCH] Add support for the uxntal language (#6047) --- book/src/generated/lang-support.md | 1 + languages.toml | 13 +++++++++++++ runtime/queries/uxntal/highlights.scm | 15 +++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 runtime/queries/uxntal/highlights.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index c31ddd3d..b9442693 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -134,6 +134,7 @@ | twig | ✓ | | | | | typescript | ✓ | ✓ | ✓ | `typescript-language-server` | | ungrammar | ✓ | | | | +| uxntal | ✓ | | | | | v | ✓ | | | `v` | | vala | ✓ | | | `vala-language-server` | | verilog | ✓ | ✓ | | `svlangserver` | diff --git a/languages.toml b/languages.toml index b521cd12..6aac1397 100644 --- a/languages.toml +++ b/languages.toml @@ -2167,3 +2167,16 @@ comment-token = "#" [[grammar]] name = "hosts" source = { git = "https://github.com/ath3/tree-sitter-hosts", rev = "301b9379ce7dfc8bdbe2c2699a6887dcb73953f9" } + +[[language]] +name = "uxntal" +scope = "source.tal" +injection-regex = "tal" +file-types = ["tal"] +roots = [] +auto-format = false +comment-token = "(" + +[[grammar]] +name = "uxntal" +source = { git = "https://github.com/Jummit/tree-sitter-uxntal", rev = "9297e95ef74380b0ad84c4fd98f91e9f6e4319e6" } diff --git a/runtime/queries/uxntal/highlights.scm b/runtime/queries/uxntal/highlights.scm new file mode 100644 index 00000000..a6ff1852 --- /dev/null +++ b/runtime/queries/uxntal/highlights.scm @@ -0,0 +1,15 @@ +; highlights.scm + +(identifier) @keyword +(number) @constant.numeric +(comment) @comment +(raw_character) @constant.character +(literal_hex) @constant.numeric.integer +(macro_definition) @function +(label_definition) @label +(sub_label_definition) @label +(relative_pad) @constant +(label) @label +(sub_label) @label +(ERROR) @error +["[" "]" "{" "}"] @punctuation.bracket