protobuf-tmbundle
protobuf-tmbundle copied to clipboard
Fix rpc method regex
https://developers.google.com/protocol-buffers/docs/reference/proto3-spec#service_definition
1
A whitespace between rpc and rpcName is not necessary.
service SearchService {
rpc Search (SearchRequest) returns (SearchResponse);
}
Below case should be highlighted properly.
service SearchService {
rpc Search(SearchRequest) returns (SearchResponse);
}
2
Stream method also be highlighted.
service SomeService {
rpc Foo (stream FooRequest) returns (FooResponse);
rpc Bar (BarRequest) returns (stream BarResponse);
rpc Baz (stream BazRequest) returns (stream BazResponse);
}
Regex test
Before https://regex101.com/r/8jyIIB/2 After https://regex101.com/r/h8btSr/1
LGTM!