mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-18 01:39:00 +00:00
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:
@@ -2,6 +2,8 @@
|
||||
(enum)
|
||||
(message)
|
||||
(service)
|
||||
(oneof)
|
||||
(rpc)
|
||||
] @fold
|
||||
|
||||
(import)+ @fold
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user