feat(proto): sync queries with upstream (#8554)

This adds support for [Protobuf Editions][1], and a couple other minor
fixes.

Ref: https://github.com/coder3101/tree-sitter-proto/tree/main/queries

[1]: https://protobuf.dev/editions/overview/
This commit is contained in:
Stefan VanBuren 2026-03-06 11:12:43 -05:00 committed by GitHub
parent 1970f0d3bb
commit ebe76eb800
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 1 deletions

View file

@ -2,6 +2,8 @@
(enum) (enum)
(message) (message)
(service) (service)
(oneof)
(rpc)
] @fold ] @fold
(import)+ @fold (import)+ @fold

View file

@ -11,6 +11,9 @@
(field_option (field_option
(identifier) @property) (identifier) @property)
(enum_value_option
(identifier) @property)
(block_lit (block_lit
(identifier) @property) (identifier) @property)
@ -21,13 +24,17 @@
"option" "option"
"reserved" "reserved"
"syntax" "syntax"
"edition"
"to" "to"
"max"
] @keyword ] @keyword
[ [
"enum" "enum"
"group"
"service" "service"
"message" "message"
"map"
] @keyword.type ] @keyword.type
"rpc" @keyword.function "rpc" @keyword.function
@ -35,9 +42,14 @@
"returns" @keyword.return "returns" @keyword.return
[ [
"export"
"local"
"optional" "optional"
"repeated" "repeated"
"required" "required"
"stream"
"weak"
"public"
] @keyword.modifier ] @keyword.modifier
[ [
@ -65,6 +77,8 @@
"\"proto2\"" "\"proto2\""
] @string.special ] @string.special
(escape_sequence) @string.escape
(int_lit) @number (int_lit) @number
(float_lit) @number.float (float_lit) @number.float
@ -97,4 +111,8 @@
":" ":"
] @punctuation.delimiter ] @punctuation.delimiter
"=" @operator [
"="
"-"
"+"
] @operator