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)
|
||||
(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue