mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -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
|
||||
(identifier) @property)
|
||||
|
||||
; Extension option names, e.g. option (foo.bar) = ...
|
||||
(option
|
||||
(full_ident
|
||||
(identifier) @variable))
|
||||
|
||||
(option
|
||||
(full_ident
|
||||
(identifier)
|
||||
(identifier) @variable.member))
|
||||
|
||||
[
|
||||
"option"
|
||||
"syntax"
|
||||
|
|
|
|||
|
|
@ -19,19 +19,27 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|||
//<- @keyword.import
|
||||
|
||||
option (gogoproto.sizer_all) = true;
|
||||
// ^^^^^^^^^ @variable
|
||||
// ^^^^^^^^^ @variable.member
|
||||
option (gogoproto.marshaler_all) = true;
|
||||
// ^^^^^^^^^ @variable
|
||||
// ^^^^^^^^^^^^^ @variable.member
|
||||
option (gogoproto.unmarshaler_all.foo) = true;
|
||||
// ^^^^^^^^^ @variable
|
||||
// ^^^^^^^^^^^^^^^ @variable.member
|
||||
// ^ @punctuation.delimiter
|
||||
// ^^^ @variable.member
|
||||
|
||||
message LogContent
|
||||
//<- @keyword.type
|
||||
{
|
||||
required string Key = 1;
|
||||
// ^^^^^^ @type
|
||||
// ^^^^^^ @type.builtin
|
||||
// ^^^ @property
|
||||
// ^ @operator
|
||||
// ^ @number
|
||||
required string Value = 2;
|
||||
// ^^^^^^ @type
|
||||
// ^^^^^^ @type.builtin
|
||||
// ^^^^^ @property
|
||||
required CustomType Value = 2;
|
||||
// ^^^^^^^^ @keyword.modifier
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue