feat(proto): add treesitter query for grpc in proto filetype (#404)

This commit is contained in:
Qiu Yu 2024-08-28 17:38:19 -07:00 committed by GitHub
parent e585934fef
commit 92f93f4e15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 44 additions and 0 deletions

View file

@ -5,3 +5,11 @@
(enum
(enum_name) @name
(#set! "kind" "Enum")) @symbol
(service
(service_name) @name
(#set! "kind" "Interface")) @symbol
(rpc
(rpc_name) @name
(#set! "kind" "Method")) @symbol

View file

@ -45,5 +45,37 @@
"end_lnum": 13,
"lnum": 13
}
},
{
"children": [
{
"col": 2,
"end_col": 43,
"end_lnum": 19,
"kind": "Method",
"level": 1,
"lnum": 19,
"name": "ello",
"selection_range": {
"col": 6,
"end_col": 10,
"end_lnum": 19,
"lnum": 19
}
}
],
"col": 0,
"end_col": 1,
"end_lnum": 20,
"kind": "Interface",
"level": 0,
"lnum": 18,
"name": "Greeter",
"selection_range": {
"col": 8,
"end_col": 15,
"end_lnum": 18,
"lnum": 18
}
}
]

View file

@ -14,3 +14,7 @@ message MessageB {
string foo = 1;
int32 bar = 2;
}
service Greeter {
rpc ello (MessageA) returns (MessageB) {}
}