diff options
| author | Stefan VanBuren <svanburen@buf.build> | 2026-03-06 11:12:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 16:12:43 +0000 |
| commit | ebe76eb800d4e8df754fc96f8a7b84f578224a97 (patch) | |
| tree | 617c8de2b5f2fe4b1b728e1f9bdc31c1b02653b4 | |
| parent | feat(robot)!: update parser and queries (diff) | |
| download | nvim-treesitter-ebe76eb800d4e8df754fc96f8a7b84f578224a97.tar nvim-treesitter-ebe76eb800d4e8df754fc96f8a7b84f578224a97.tar.gz nvim-treesitter-ebe76eb800d4e8df754fc96f8a7b84f578224a97.tar.bz2 nvim-treesitter-ebe76eb800d4e8df754fc96f8a7b84f578224a97.tar.lz nvim-treesitter-ebe76eb800d4e8df754fc96f8a7b84f578224a97.tar.xz nvim-treesitter-ebe76eb800d4e8df754fc96f8a7b84f578224a97.tar.zst nvim-treesitter-ebe76eb800d4e8df754fc96f8a7b84f578224a97.zip | |
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/
| -rw-r--r-- | runtime/queries/proto/folds.scm | 2 | ||||
| -rw-r--r-- | runtime/queries/proto/highlights.scm | 20 |
2 files changed, 21 insertions, 1 deletions
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 |
