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
2 changed files with 21 additions and 1 deletions

View File

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

View File

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