aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriko2024-02-12 15:36:14 +0000
committerGitHub2024-02-12 15:36:14 +0000
commitd7c7589fd5d4dc307f37e23bdac1e5fec4ded4fc (patch)
tree65c3eecf5b729db7d7ea628e1251db8e85405ca7
parentad7b7bc8047d3c0930bbc6201d8f69132b396b9b (diff)
Add Hoon (#9190)
* Added Hoon * Added highlights.scm * Updated docs * Update runtime/queries/hoon/highlights.scm Co-authored-by: Michael Davis <mcarsondavis@gmail.com> --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
-rw-r--r--book/src/generated/lang-support.md1
-rw-r--r--languages.toml12
-rw-r--r--runtime/queries/hoon/highlights.scm32
3 files changed, 45 insertions, 0 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 9131ff58..bfe6d6b1 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -70,6 +70,7 @@
| hcl | ✓ | | ✓ | `terraform-ls` |
| heex | ✓ | ✓ | | `elixir-ls` |
| hocon | ✓ | | ✓ | |
+| hoon | ✓ | | | |
| hosts | ✓ | | | |
| html | ✓ | | | `vscode-html-language-server` |
| hurl | ✓ | | ✓ | |
diff --git a/languages.toml b/languages.toml
index 6fc81181..d7b8e0d9 100644
--- a/languages.toml
+++ b/languages.toml
@@ -3056,6 +3056,18 @@ name = "log"
source = { git = "https://github.com/Tudyx/tree-sitter-log", rev = "62cfe307e942af3417171243b599cc7deac5eab9" }
[[language]]
+name = "hoon"
+scope = "source.hoon"
+injection-regex = "hoon"
+file-types = ["hoon"]
+comment-token = "::"
+indent = {tab-width = 2, unit = " "}
+
+[[grammar]]
+name = "hoon"
+source = { git = "https://github.com/urbit-pilled/tree-sitter-hoon", rev = "1d5df35af3e0afe592832a67b9fb3feeeba1f7b6" }
+
+[[language]]
name = "hocon"
scope = "source.conf"
file-types = ["conf"]
diff --git a/runtime/queries/hoon/highlights.scm b/runtime/queries/hoon/highlights.scm
new file mode 100644
index 00000000..91e6b854
--- /dev/null
+++ b/runtime/queries/hoon/highlights.scm
@@ -0,0 +1,32 @@
+(number) @constant.numeric
+
+(string) @string
+
+[
+ "("
+ ")"
+ "["
+ "]"
+] @punctuation.bracket
+
+[
+ (coreTerminator)
+ (seriesTerminator)
+] @punctuation.delimiter
+
+
+(rune) @keyword
+
+(term) @constant
+
+(aura) @constant.builtin
+
+(Gap) @comment
+
+(boolean) @constant.builtin
+
+(date) @constant.builtin
+(mold) @constant.builtin
+(specialIndex) @constant.builtin
+(lark) @operator
+(fullContext) @constant.builtin