mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 18:00:07 -04:00
feat: add RON
This commit is contained in:
parent
70af55b428
commit
720f75f988
8 changed files with 100 additions and 2 deletions
|
|
@ -290,6 +290,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [regex](https://github.com/tree-sitter/tree-sitter-regex) (maintained by @theHamsta)
|
- [x] [regex](https://github.com/tree-sitter/tree-sitter-regex) (maintained by @theHamsta)
|
||||||
- [x] [rego](https://github.com/FallenAngel97/tree-sitter-rego) (maintained by @FallenAngel97)
|
- [x] [rego](https://github.com/FallenAngel97/tree-sitter-rego) (maintained by @FallenAngel97)
|
||||||
- [x] [rnoweb](https://github.com/bamonroe/tree-sitter-rnoweb) (maintained by @bamonroe)
|
- [x] [rnoweb](https://github.com/bamonroe/tree-sitter-rnoweb) (maintained by @bamonroe)
|
||||||
|
- [x] [ron](https://github.com/amaanq/tree-sitter-ron) (maintained by @amaanq)
|
||||||
- [x] [rst](https://github.com/stsewd/tree-sitter-rst) (maintained by @stsewd)
|
- [x] [rst](https://github.com/stsewd/tree-sitter-rst) (maintained by @stsewd)
|
||||||
- [x] [ruby](https://github.com/tree-sitter/tree-sitter-ruby) (maintained by @TravonteD)
|
- [x] [ruby](https://github.com/tree-sitter/tree-sitter-ruby) (maintained by @TravonteD)
|
||||||
- [x] [rust](https://github.com/tree-sitter/tree-sitter-rust) (maintained by @vigoux)
|
- [x] [rust](https://github.com/tree-sitter/tree-sitter-rust) (maintained by @vigoux)
|
||||||
|
|
|
||||||
|
|
@ -353,6 +353,9 @@
|
||||||
"rnoweb": {
|
"rnoweb": {
|
||||||
"revision": "502c1126dc6777f09af5bef16e72a42f75bd081e"
|
"revision": "502c1126dc6777f09af5bef16e72a42f75bd081e"
|
||||||
},
|
},
|
||||||
|
"ron": {
|
||||||
|
"revision": "81e528eeb35518b8ef6f2761e91c0b10c76b4183"
|
||||||
|
},
|
||||||
"rst": {
|
"rst": {
|
||||||
"revision": "25e6328872ac3a764ba8b926aea12719741103f1"
|
"revision": "25e6328872ac3a764ba8b926aea12719741103f1"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,6 @@ list.func = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/amaanq/tree-sitter-func",
|
url = "https://github.com/amaanq/tree-sitter-func",
|
||||||
files = { "src/parser.c" },
|
files = { "src/parser.c" },
|
||||||
branch = "master",
|
|
||||||
},
|
},
|
||||||
maintainers = { "@amaanq" },
|
maintainers = { "@amaanq" },
|
||||||
}
|
}
|
||||||
|
|
@ -755,7 +754,6 @@ list.julia = {
|
||||||
list.kdl = {
|
list.kdl = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/amaanq/tree-sitter-kdl",
|
url = "https://github.com/amaanq/tree-sitter-kdl",
|
||||||
branch = "master",
|
|
||||||
files = { "src/parser.c", "src/scanner.c" },
|
files = { "src/parser.c", "src/scanner.c" },
|
||||||
},
|
},
|
||||||
maintainers = { "@amaanq" },
|
maintainers = { "@amaanq" },
|
||||||
|
|
@ -1128,6 +1126,14 @@ list.rnoweb = {
|
||||||
maintainers = { "@bamonroe" },
|
maintainers = { "@bamonroe" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.ron = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/amaanq/tree-sitter-ron",
|
||||||
|
files = { "src/parser.c", "src/scanner.c" },
|
||||||
|
},
|
||||||
|
maintainers = { "@amaanq" },
|
||||||
|
}
|
||||||
|
|
||||||
list.rst = {
|
list.rst = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/stsewd/tree-sitter-rst",
|
url = "https://github.com/stsewd/tree-sitter-rst",
|
||||||
|
|
|
||||||
7
queries/ron/folds.scm
Normal file
7
queries/ron/folds.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
[
|
||||||
|
(array)
|
||||||
|
(map)
|
||||||
|
(tuple)
|
||||||
|
(struct)
|
||||||
|
(block_comment)
|
||||||
|
] @fold
|
||||||
53
queries/ron/highlights.scm
Normal file
53
queries/ron/highlights.scm
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
; Structs
|
||||||
|
;------------
|
||||||
|
|
||||||
|
(enum_variant) @constant
|
||||||
|
(struct_entry (identifier) @property)
|
||||||
|
(struct_entry (enum_variant (identifier) @constant))
|
||||||
|
(struct_name (identifier)) @type
|
||||||
|
|
||||||
|
(unit_struct) @type.builtin
|
||||||
|
|
||||||
|
|
||||||
|
; Literals
|
||||||
|
;------------
|
||||||
|
|
||||||
|
(string) @string
|
||||||
|
(boolean) @boolean
|
||||||
|
(integer) @number
|
||||||
|
(float) @float
|
||||||
|
(char) @character
|
||||||
|
|
||||||
|
|
||||||
|
; Comments
|
||||||
|
;------------
|
||||||
|
|
||||||
|
[
|
||||||
|
(line_comment)
|
||||||
|
(block_comment)
|
||||||
|
] @comment @spell
|
||||||
|
|
||||||
|
|
||||||
|
; Punctuation
|
||||||
|
;------------
|
||||||
|
|
||||||
|
["{" "}"] @punctuation.bracket
|
||||||
|
|
||||||
|
["(" ")"] @punctuation.bracket
|
||||||
|
|
||||||
|
["[" "]"] @punctuation.bracket
|
||||||
|
|
||||||
|
[
|
||||||
|
","
|
||||||
|
":"
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"-"
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
; Special
|
||||||
|
;------------
|
||||||
|
|
||||||
|
(escape_sequence) @string.escape
|
||||||
|
(ERROR) @error
|
||||||
12
queries/ron/indents.scm
Normal file
12
queries/ron/indents.scm
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
[
|
||||||
|
(array)
|
||||||
|
(map)
|
||||||
|
(tuple)
|
||||||
|
(struct)
|
||||||
|
] @indent
|
||||||
|
|
||||||
|
[ "{" "}" ] @branch
|
||||||
|
|
||||||
|
[ "(" ")" ] @branch
|
||||||
|
|
||||||
|
[ "[" "]" ] @branch
|
||||||
4
queries/ron/injections.scm
Normal file
4
queries/ron/injections.scm
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
[
|
||||||
|
(line_comment)
|
||||||
|
(block_comment)
|
||||||
|
] @comment
|
||||||
12
queries/ron/locals.scm
Normal file
12
queries/ron/locals.scm
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
(source_file) @scope
|
||||||
|
(source_file (array) @scope)
|
||||||
|
(source_file (map) @scope)
|
||||||
|
(source_file (struct) @scope)
|
||||||
|
(source_file (tuple) @scope)
|
||||||
|
|
||||||
|
(identifier) @reference
|
||||||
|
|
||||||
|
(struct_entry (identifier) @definition.field)
|
||||||
|
(struct_entry (identifier) @definition.enum (enum_variant))
|
||||||
|
|
||||||
|
(struct (struct_name) @definition.type)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue