mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat(sproto): add parser
This commit is contained in:
parent
9866036ec3
commit
13e3ce3bf4
6 changed files with 74 additions and 0 deletions
1
SUPPORTED_LANGUAGES.md
generated
1
SUPPORTED_LANGUAGES.md
generated
|
|
@ -269,6 +269,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | | @steelsojka
|
|||
[sosl](https://github.com/aheber/tree-sitter-sfapex) | unstable | `H ` | | @aheber, @xixiafinland
|
||||
[sourcepawn](https://github.com/nilshelmig/tree-sitter-sourcepawn) | unstable | `H JL` | | @Sarrus1
|
||||
[sparql](https://github.com/GordianDziwis/tree-sitter-sparql) | unstable | `HFIJL` | | @GordianDziwis
|
||||
[sproto](https://github.com/hanxi/tree-sitter-sproto) | unstable | `HFIJ ` | | @hanxi
|
||||
[sql](https://github.com/derekstride/tree-sitter-sql) | unstable | `HFIJ ` | | @derekstride
|
||||
[squirrel](https://github.com/tree-sitter-grammars/tree-sitter-squirrel) | unstable | `HFIJL` | | @amaanq
|
||||
[ssh_config](https://github.com/tree-sitter-grammars/tree-sitter-ssh-config) | unstable | `HFIJL` | | @ObserverOfTime
|
||||
|
|
|
|||
|
|
@ -2115,6 +2115,14 @@ return {
|
|||
maintainers = { '@GordianDziwis' },
|
||||
tier = 2,
|
||||
},
|
||||
sproto = {
|
||||
install_info = {
|
||||
revision = 'd554c1456e35e7b2690552d52921c987d0cf6799',
|
||||
url = 'https://github.com/hanxi/tree-sitter-sproto',
|
||||
},
|
||||
maintainers = { '@hanxi' },
|
||||
tier = 2,
|
||||
},
|
||||
sql = {
|
||||
install_info = {
|
||||
branch = 'gh-pages',
|
||||
|
|
|
|||
6
runtime/queries/sproto/folds.scm
Normal file
6
runtime/queries/sproto/folds.scm
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
(type_definition)
|
||||
(protocol_definition)
|
||||
(request_block)
|
||||
(response_block)
|
||||
] @fold
|
||||
47
runtime/queries/sproto/highlights.scm
Normal file
47
runtime/queries/sproto/highlights.scm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
(comment) @comment @spell
|
||||
|
||||
[
|
||||
"."
|
||||
":"
|
||||
] @punctuation.delimiter
|
||||
|
||||
"*" @operator
|
||||
|
||||
[
|
||||
"request"
|
||||
"response"
|
||||
] @keyword
|
||||
|
||||
(type_definition
|
||||
name: (identifier) @type)
|
||||
|
||||
(nested_type_definition
|
||||
name: (identifier) @type)
|
||||
|
||||
(type_specifier) @type
|
||||
|
||||
[
|
||||
"integer"
|
||||
"boolean"
|
||||
"string"
|
||||
"binary"
|
||||
"double"
|
||||
] @type.builtin
|
||||
|
||||
(protocol_definition
|
||||
name: (identifier) @function)
|
||||
|
||||
(field_definition
|
||||
name: (identifier) @property)
|
||||
|
||||
(map_specifier
|
||||
key: (identifier) @property)
|
||||
|
||||
(integer) @number
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
10
runtime/queries/sproto/indents.scm
Normal file
10
runtime/queries/sproto/indents.scm
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[
|
||||
(type_definition)
|
||||
(protocol_definition)
|
||||
(request_block)
|
||||
(response_block)
|
||||
] @indent.begin
|
||||
|
||||
"}" @indent.end @indent.branch
|
||||
|
||||
(comment) @indent.auto
|
||||
2
runtime/queries/sproto/injections.scm
Normal file
2
runtime/queries/sproto/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue