File tree Expand file tree Collapse file tree 4 files changed +36
-11
lines changed Expand file tree Collapse file tree 4 files changed +36
-11
lines changed Original file line number Diff line number Diff line change 1
1
<snippet >
2
- <content ><![CDATA[ let ${1:name}: ${2:type} = ${0:value};]]> </content >
2
+ <content ><![CDATA[ let ${1:name}${2:: type} = ${0:value};]]> </content >
3
3
<tabTrigger >variable</tabTrigger >
4
4
<scope >source.tact</scope >
5
5
<description >let …: … = …;</description >
Original file line number Diff line number Diff line change 849
849
</dict >
850
850
<key >variable </key >
851
851
<dict >
852
- <key >comment </key >
853
- <string >Any valid Tact identifier </string >
854
- <key >match </key >
855
- <string >\b([a-zA-Z_][a-zA-Z0-9_]*)\b </string >
856
- <key >name </key >
857
- <string >variable.other.tact </string >
852
+ <key >patterns </key >
853
+ <array >
854
+ <dict >
855
+ <key >comment </key >
856
+ <string >Any valid Tact identifier </string >
857
+ <key >match </key >
858
+ <string >(?< !\.)\b(_)\b </string >
859
+ <key >name </key >
860
+ <string >comment.unused-identifier.tact </string >
861
+ </dict >
862
+ <dict >
863
+ <key >comment </key >
864
+ <string >Any valid Tact identifier </string >
865
+ <key >match </key >
866
+ <string >\b([a-zA-Z_][a-zA-Z0-9_]*)\b </string >
867
+ <key >name </key >
868
+ <string >variable.other.tact </string >
869
+ </dict >
870
+ </array >
858
871
</dict >
859
872
</dict >
860
873
</dict >
861
- </plist >
874
+ </plist >
Original file line number Diff line number Diff line change 556
556
},
557
557
558
558
"variable" : {
559
- "comment" : " Any valid Tact identifier" ,
560
- "match" : " \\ b([a-zA-Z_][a-zA-Z0-9_]*)\\ b" ,
561
- "name" : " variable.other.tact"
559
+ "patterns" : [
560
+ {
561
+ "comment" : " Any valid Tact identifier" ,
562
+ "match" : " (?<!\\ .)\\ b(_)\\ b" ,
563
+ "name" : " comment.unused-identifier.tact"
564
+ },
565
+ {
566
+ "comment" : " Any valid Tact identifier" ,
567
+ "match" : " \\ b([a-zA-Z_][a-zA-Z0-9_]*)\\ b" ,
568
+ "name" : " variable.other.tact"
569
+ }
570
+ ]
562
571
}
563
572
}
564
573
}
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ extends fun c(self: SomeMessage): Int {
52
52
// ^^ keyword.operator.assignment.tact
53
53
// ^^ constant.numeric.decimal.tact
54
54
// ^ punctuation.semi.tact
55
+
56
+ let _ = 20 ;
57
+ // ^ comment.unused-identifier.tact
55
58
}
56
59
57
60
self .description = " Tact is awesome!" ;
You can’t perform that action at this time.
0 commit comments