mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04: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:
parent
1970f0d3bb
commit
ebe76eb800
2 changed files with 21 additions and 1 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
(enum)
|
(enum)
|
||||||
(message)
|
(message)
|
||||||
(service)
|
(service)
|
||||||
|
(oneof)
|
||||||
|
(rpc)
|
||||||
] @fold
|
] @fold
|
||||||
|
|
||||||
(import)+ @fold
|
(import)+ @fold
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue