mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Re-add option handling; fix builtin type assertion
Now need to wait for coder3101/tree-sitter-proto#23 to land to really sync this with upstream.
This commit is contained in:
parent
d45b7245b8
commit
86745d66a3
2 changed files with 20 additions and 2 deletions
|
|
@ -31,6 +31,16 @@
|
||||||
(block_lit
|
(block_lit
|
||||||
(identifier) @property)
|
(identifier) @property)
|
||||||
|
|
||||||
|
; Extension option names, e.g. option (foo.bar) = ...
|
||||||
|
(option
|
||||||
|
(full_ident
|
||||||
|
(identifier) @variable))
|
||||||
|
|
||||||
|
(option
|
||||||
|
(full_ident
|
||||||
|
(identifier)
|
||||||
|
(identifier) @variable.member))
|
||||||
|
|
||||||
[
|
[
|
||||||
"option"
|
"option"
|
||||||
"syntax"
|
"syntax"
|
||||||
|
|
|
||||||
|
|
@ -19,19 +19,27 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
//<- @keyword.import
|
//<- @keyword.import
|
||||||
|
|
||||||
option (gogoproto.sizer_all) = true;
|
option (gogoproto.sizer_all) = true;
|
||||||
|
// ^^^^^^^^^ @variable
|
||||||
|
// ^^^^^^^^^ @variable.member
|
||||||
option (gogoproto.marshaler_all) = true;
|
option (gogoproto.marshaler_all) = true;
|
||||||
|
// ^^^^^^^^^ @variable
|
||||||
|
// ^^^^^^^^^^^^^ @variable.member
|
||||||
option (gogoproto.unmarshaler_all.foo) = true;
|
option (gogoproto.unmarshaler_all.foo) = true;
|
||||||
|
// ^^^^^^^^^ @variable
|
||||||
|
// ^^^^^^^^^^^^^^^ @variable.member
|
||||||
|
// ^ @punctuation.delimiter
|
||||||
|
// ^^^ @variable.member
|
||||||
|
|
||||||
message LogContent
|
message LogContent
|
||||||
//<- @keyword.type
|
//<- @keyword.type
|
||||||
{
|
{
|
||||||
required string Key = 1;
|
required string Key = 1;
|
||||||
// ^^^^^^ @type
|
// ^^^^^^ @type.builtin
|
||||||
// ^^^ @property
|
// ^^^ @property
|
||||||
// ^ @operator
|
// ^ @operator
|
||||||
// ^ @number
|
// ^ @number
|
||||||
required string Value = 2;
|
required string Value = 2;
|
||||||
// ^^^^^^ @type
|
// ^^^^^^ @type.builtin
|
||||||
// ^^^^^ @property
|
// ^^^^^ @property
|
||||||
required CustomType Value = 2;
|
required CustomType Value = 2;
|
||||||
// ^^^^^^^^ @keyword.modifier
|
// ^^^^^^^^ @keyword.modifier
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue