@@ -152,6 +152,7 @@ contexts:
152
152
push : paren-body
153
153
154
154
paren-body :
155
+ - meta_scope : meta.parens.terraform
155
156
- match : \)
156
157
scope : punctuation.section.parens.end.terraform
157
158
pop : 1
@@ -444,6 +445,7 @@ contexts:
444
445
push : bracket-body
445
446
446
447
bracket-body :
448
+ - meta_scope : meta.brackets.terraform
447
449
- match : (\*)?\]
448
450
comment : Full-splat operator
449
451
scope : punctuation.section.brackets.end.terraform
@@ -487,15 +489,15 @@ contexts:
487
489
- include : Packages/Terraform/JSON (Terraform).sublime-syntax#object-body
488
490
489
491
object-computed-key :
490
- - meta_scope : meta.mapping.key.terraform
492
+ - meta_scope : meta.mapping.key.terraform meta.parens.terraform
491
493
- include : paren-body
492
494
493
495
object-literal-key :
494
496
- match : ' {{identifier}}'
495
- scope : meta.mapping.key.terraform string.unquoted.terraform
497
+ scope : meta.mapping.key.terraform meta.string.terraform string.unquoted.terraform
496
498
pop : 1
497
499
- match : (\").*?(\")
498
- scope : meta.mapping.key.terraform string.quoted.double.terraform
500
+ scope : meta.mapping.key.terraform meta.string.terraform string.quoted.double.terraform
499
501
captures :
500
502
1 : punctuation.definition.string.begin.terraform
501
503
2 : punctuation.definition.string.end.terraform
@@ -581,6 +583,7 @@ contexts:
581
583
pop : 1
582
584
583
585
attribute-key-end :
586
+ - meta_scope : meta.parens.terraform
584
587
- match : \)
585
588
scope : punctuation.section.parens.end.terraform
586
589
pop : 1
@@ -620,8 +623,9 @@ contexts:
620
623
set : tuple-for-expression-body
621
624
622
625
tuple-for-expression-body :
626
+ - meta_content_scope : meta.brackets.terraform
623
627
- match : \]
624
- scope : punctuation.section.brackets.end.terraform
628
+ scope : meta.brackets.terraform punctuation.section.brackets.end.terraform
625
629
pop : 1
626
630
- include : for-expression-body
627
631
@@ -638,8 +642,9 @@ contexts:
638
642
set : object-for-expression-body
639
643
640
644
object-for-expression-body :
645
+ - meta_content_scope : meta.braces.terraform
641
646
- match : \}
642
- scope : punctuation.section.braces.end.terraform
647
+ scope : meta.braces.terraform punctuation.section.braces.end.terraform
643
648
pop : 1
644
649
- match : \=\>
645
650
scope : punctuation.separator.key-value.terraform
@@ -678,25 +683,26 @@ contexts:
678
683
6 : punctuation.definition.begin.terraform
679
684
7 : entity.name.type.aws
680
685
8 : punctuation.definition.end.terraform
681
- 9 : punctuation.section.block.begin.terraform
686
+ 9 : meta.block.terraform punctuation.section.block.begin.terraform
682
687
push : block-body
683
-
684
688
# Generic
685
- - match : (?:\b({{terraform_known_blocks}})\b|({{identifier}}))(?=[\s\"\-[:word:]]*(\{))
689
+ - match : (?:\b({{terraform_known_blocks}})\b|({{identifier}}))(?=[-\s\w"]*\{)
690
+ scope : meta.type.terraform
686
691
captures :
687
692
1 : keyword.declaration.terraform
688
693
2 : entity.name.type.terraform
689
694
push : block-name
690
695
691
696
block-name :
692
- - meta_scope : meta.type.terraform
697
+ - meta_content_scope : meta.type.terraform
693
698
- match : \"
694
699
scope : punctuation.definition.string.begin.terraform
695
700
push : block-name-body
696
701
- match : ' {{identifier}}'
697
702
scope : entity.name.label.terraform
698
- - match : \{
699
- scope : punctuation.section.block.begin.terraform
703
+ - match : \s*(\{)
704
+ captures :
705
+ 1 : meta.block.terraform punctuation.section.block.begin.terraform
700
706
set : block-body
701
707
702
708
block-name-body :
@@ -706,9 +712,9 @@ contexts:
706
712
pop : 1
707
713
708
714
block-body :
709
- - meta_scope : meta.block.terraform
715
+ - meta_content_scope : meta.block.terraform
710
716
- match : \}
711
- scope : punctuation.section.block.end.terraform
717
+ scope : meta.block.terraform punctuation.section.block.end.terraform
712
718
pop : 1
713
719
- include : main
714
720
0 commit comments