From ebe76eb800d4e8df754fc96f8a7b84f578224a97 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Fri, 6 Mar 2026 11:12:43 -0500 Subject: 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/ --- runtime/queries/proto/folds.scm | 2 ++ runtime/queries/proto/highlights.scm | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/runtime/queries/proto/folds.scm b/runtime/queries/proto/folds.scm index 76f688b7d..87fe6d304 100644 --- a/runtime/queries/proto/folds.scm +++ b/runtime/queries/proto/folds.scm @@ -2,6 +2,8 @@ (enum) (message) (service) + (oneof) + (rpc) ] @fold (import)+ @fold diff --git a/runtime/queries/proto/highlights.scm b/runtime/queries/proto/highlights.scm index 894686dd4..22df9002f 100644 --- a/runtime/queries/proto/highlights.scm +++ b/runtime/queries/proto/highlights.scm @@ -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 -- cgit v1.3