aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--lockfile.json3
-rw-r--r--lua/nvim-treesitter/parsers.lua9
-rw-r--r--queries/hoon/folds.scm6
-rw-r--r--queries/hoon/highlights.scm33
-rw-r--r--queries/hoon/locals.scm4
6 files changed, 56 insertions, 0 deletions
diff --git a/README.md b/README.md
index 64f7d412f..0209883a8 100644
--- a/README.md
+++ b/README.md
@@ -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)
diff --git a/lockfile.json b/lockfile.json
index 9400c3986..ed9371001 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -221,6 +221,9 @@
"hocon": {
"revision": "c390f10519ae69fdb03b3e5764f5592fb6924bcc"
},
+ "hoon": {
+ "revision": "37563e0b57dfc7b0e6072f8b12f98cedaf22553a"
+ },
"html": {
"revision": "ab91d87963c47ffd08a7967b9aa73eb53293d120"
},
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index da5be1a5d..7b0cc438d 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -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",
diff --git a/queries/hoon/folds.scm b/queries/hoon/folds.scm
new file mode 100644
index 000000000..93d1386e7
--- /dev/null
+++ b/queries/hoon/folds.scm
@@ -0,0 +1,6 @@
+[
+ (bartisTall)
+ (luslusTall)
+ (lusbucTall)
+ (barcenTall)
+ ] @fold
diff --git a/queries/hoon/highlights.scm b/queries/hoon/highlights.scm
new file mode 100644
index 000000000..f7136f63e
--- /dev/null
+++ b/queries/hoon/highlights.scm
@@ -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
diff --git a/queries/hoon/locals.scm b/queries/hoon/locals.scm
new file mode 100644
index 000000000..159783fd0
--- /dev/null
+++ b/queries/hoon/locals.scm
@@ -0,0 +1,4 @@
+(tisfasTall
+ name: (name) @definition.var)
+
+(name) @reference