feat: add Hoon language support

---------

Co-authored-by: urbit-pilled <urbit-pilled>
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
This commit is contained in:
urbit-pilled 2023-06-30 11:26:44 +12:00 committed by GitHub
parent 849645e893
commit 04dda34cb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 56 additions and 0 deletions

View file

@ -247,6 +247,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [hjson](https://github.com/winston0410/tree-sitter-hjson) (maintained by @winston0410)
- [x] [hlsl](https://github.com/theHamsta/tree-sitter-hlsl) (maintained by @theHamsta)
- [x] [hocon](https://github.com/antosha417/tree-sitter-hocon) (maintained by @antosha417)
- [x] [hoon](https://github.com/urbit-pilled/tree-sitter-hoon) (experimental, maintained by @urbit-pilled)
- [x] [html](https://github.com/tree-sitter/tree-sitter-html) (maintained by @TravonteD)
- [x] [htmldjango](https://github.com/interdependence/tree-sitter-htmldjango) (experimental, maintained by @ObserverOfTime)
- [x] [http](https://github.com/rest-nvim/tree-sitter-http) (maintained by @amaanq)

View file

@ -221,6 +221,9 @@
"hocon": {
"revision": "c390f10519ae69fdb03b3e5764f5592fb6924bcc"
},
"hoon": {
"revision": "37563e0b57dfc7b0e6072f8b12f98cedaf22553a"
},
"html": {
"revision": "ab91d87963c47ffd08a7967b9aa73eb53293d120"
},

View file

@ -694,6 +694,15 @@ list.hocon = {
maintainers = { "@antosha417" },
}
list.hoon = {
install_info = {
url = "https://github.com/urbit-pilled/tree-sitter-hoon",
files = { "src/parser.c" },
},
maintainers = { "@urbit-pilled" },
experimental = true,
}
list.html = {
install_info = {
url = "https://github.com/tree-sitter/tree-sitter-html",

6
queries/hoon/folds.scm Normal file
View file

@ -0,0 +1,6 @@
[
(bartisTall)
(luslusTall)
(lusbucTall)
(barcenTall)
] @fold

View file

@ -0,0 +1,33 @@
(number) @number
(string) @string
[
"("
")"
"["
"]"
] @punctuation.bracket
[
(coreTerminator)
(seriesTerminator)
] @punctuation.delimiter
(rune) @operator
(term) @constant
(aura) @constant.builtin
(Gap) @comment
(boolean) @constant.builtin
(date) @string.special
(mold) @symbol
(specialIndex) @number.builtin
(lark) @operator
(fullContext) @symbol

4
queries/hoon/locals.scm Normal file
View file

@ -0,0 +1,4 @@
(tisfasTall
name: (name) @definition.var)
(name) @reference