Skip to content

Commit

Permalink
Add Hoon (#9190)
Browse files Browse the repository at this point in the history
* Added Hoon

* Added highlights.scm

* Updated docs

* Update runtime/queries/hoon/highlights.scm

Co-authored-by: Michael Davis <[email protected]>

---------

Co-authored-by: Michael Davis <[email protected]>
  • Loading branch information
ilyakooo0 and the-mikedavis authored Feb 12, 2024
1 parent ad7b7bc commit d7c7589
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
| hcl || || `terraform-ls` |
| heex ||| | `elixir-ls` |
| hocon || || |
| hoon || | | |
| hosts || | | |
| html || | | `vscode-html-language-server` |
| hurl || || |
Expand Down
12 changes: 12 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3055,6 +3055,18 @@ file-types = ["log"]
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"
Expand Down
32 changes: 32 additions & 0 deletions runtime/queries/hoon/highlights.scm
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d7c7589

Please sign in to comment.