aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Mildenberger2022-07-12 15:06:53 +0000
committerGitHub2022-07-12 15:06:53 +0000
commite97b8607c18c16f14ab17825ac20739c4d83b779 (patch)
treed5595692c92cb76700cfcd6440dbd5e08c7aa073
parentfb625697854e3a9d99aa4cfe952f2050b7e82ce0 (diff)
Added ungrammar language support (#3048)
-rw-r--r--book/src/generated/lang-support.md1
-rw-r--r--languages.toml15
-rw-r--r--runtime/queries/ungrammar/highlights.scm17
3 files changed, 32 insertions, 1 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 085d92a8..978f42a7 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -98,6 +98,7 @@
| tsx | ✓ | | | `typescript-language-server` |
| twig | ✓ | | | |
| typescript | ✓ | | ✓ | `typescript-language-server` |
+| ungrammar | ✓ | | | |
| v | ✓ | | | `vls` |
| vala | ✓ | | | `vala-language-server` |
| verilog | ✓ | ✓ | | `svlangserver` |
diff --git a/languages.toml b/languages.toml
index 3be20ab3..20493e4c 100644
--- a/languages.toml
+++ b/languages.toml
@@ -1527,4 +1527,17 @@ language-server = { command = "fortls", args = ["--lowercase_intrinsics"] }
[[grammar]]
name = "fortran"
-source = { git = "https://github.com/stadelmanma/tree-sitter-fortran", rev = "f0f2f100952a353e64e26b0fa710b4c296d7af13" } \ No newline at end of file
+source = { git = "https://github.com/stadelmanma/tree-sitter-fortran", rev = "f0f2f100952a353e64e26b0fa710b4c296d7af13" }
+
+[[language]]
+name = "ungrammar"
+scope = "source.ungrammar"
+injection-regex = "ungrammar"
+file-types = ["ungram", "ungrammar"]
+roots = []
+comment-token = "//"
+indent = { tab-width = 2, unit = " " }
+
+[[grammar]]
+name = "ungrammar"
+source = { git = "https://github.com/Philipp-M/tree-sitter-ungrammar", rev = "0113de880a58ea14f2a75802e9b99fcc25003d9c" }
diff --git a/runtime/queries/ungrammar/highlights.scm b/runtime/queries/ungrammar/highlights.scm
new file mode 100644
index 00000000..cffbdbfd
--- /dev/null
+++ b/runtime/queries/ungrammar/highlights.scm
@@ -0,0 +1,17 @@
+(ERROR) @error
+
+(line_comment) @comment
+
+(identifier) @variable
+
+(token) @string
+
+[
+ "="
+ "|"
+ ":"
+ "("
+ ")"
+ "?"
+ "*"
+] @operator