aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/proto/test.proto
blob: fdc61078231b5c430a74bd43f9fa3358fcc226d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
syntax = "proto2";
//       ^^^^^^^^ @string.special
package sls.asfd.asfd;
//      ^^^ @variable
//         ^ @punctuation.delimiter
//          ^^^^ @variable.member
//              ^ @punctuation.delimiter
//               ^^^^ @variable.member
//                   ^ @punctuation.delimiter

import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
//<- @keyword.import

option (gogoproto.sizer_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all.foo) = true;
//      ^^^^^^^^^ @variable
//                ^^^^^^^^^^^^^^^ @variable.member
//                               ^ @punctuation.delimiter
//                                ^^^ @variable.member

message LogContent
//<- @keyword.type
{
    required string Key = 1;
//           ^^^^^^ @type
//                  ^^^ @property
//                      ^ @operator
//                        ^ @number
    required string Value = 2;
//           ^^^^^^ @type
//                  ^^^^^ @property
    required CustomType Value = 2;
//  ^^^^^^^^ @keyword.modifier
//           ^^^^^^^^^^ @type

    optional string cgroup_pids_mount = 76 [default = "/sys/fs/cgroup/pids"];

    optional JsonFormat json_format = 6 [
//  ^^^^^^^^ @keyword.modifier
      retention = RETENTION_RUNTIME,
//                ^^^^^^^^^^^^^^^^^ @variable
//                                 ^ @punctuation.delimiter
      targets = TARGET_TYPE_MESSAGE,
//    ^^^^^^^ @property
      targets = TARGET_TYPE_ENUM,
      targets = TARGET_TYPE_FILE,
      edition_defaults = { edition: "2023", value: "ALLOW" }
//                         ^^^^^^^ @property
//                                ^ @punctuation.delimiter
//                                               ^ @punctuation.delimiter
//                                                         ^ @punctuation.bracket
    ];
}