From 33bccdc1ee433abc72094421f33a67a29492e17b Mon Sep 17 00:00:00 2001 From: Michael Lyons Date: Mon, 15 Jun 2026 18:47:31 -0400 Subject: [PATCH] Exclude prototype in more places Fixes #105 --- Terraform.sublime-syntax | 4 ++++ tests/syntax_test_scope.tf | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/Terraform.sublime-syntax b/Terraform.sublime-syntax index 18f172a..e35d613 100644 --- a/Terraform.sublime-syntax +++ b/Terraform.sublime-syntax @@ -335,6 +335,7 @@ contexts: push: aws-acl-body aws-acl-body: + - meta_include_prototype: false - clear_scopes: 1 # Clear the string.* scope. - meta_scope: variable.language.acl.terraform - match: ([$%]\{)(~)? @@ -432,6 +433,7 @@ contexts: push: heredoc-body heredoc-body: + - meta_include_prototype: false - meta_content_scope: meta.string.terraform string.unquoted.heredoc.terraform - match: ^\s*\2\s*$ comment: The heredoc token identifier (second capture above). @@ -812,6 +814,7 @@ contexts: - include: else-pop block-type-label-body: + - meta_include_prototype: false - meta_scope: meta.string.terraform - meta_content_scope: support.type.terraform - match: \" @@ -829,6 +832,7 @@ contexts: - include: else-pop block-name-label-body: + - meta_include_prototype: false - meta_scope: meta.string.terraform - meta_content_scope: entity.name.label.terraform - match: \" diff --git a/tests/syntax_test_scope.tf b/tests/syntax_test_scope.tf index 6a4fe35..8a3216b 100644 --- a/tests/syntax_test_scope.tf +++ b/tests/syntax_test_scope.tf @@ -3549,6 +3549,21 @@ resource "aws_iam_role_policy" "attach-inline-policy-1" { # ^ punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - variable + res_arn = "arn:aws:s3:::*/*" +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.block.body.terraform - comment +# ^^^^^^^ variable.declaration.terraform variable.other.readwrite.terraform +# ^ keyword.operator.assignment.terraform +# ^^^^^^^^^^^^^^^^^^ meta.string.terraform +# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform +# ^^^^^^^^^^^^^^^^ variable.language.acl.terraform +# ^ punctuation.separator.sequence.terraform +# ^ punctuation.separator.sequence.terraform +# ^^^ punctuation.separator.sequence.terraform +# ^ constant.other.wildcard.asterisk.terraform +# ^ punctuation.separator.sequence.terraform +# ^ constant.other.wildcard.asterisk.terraform +# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform + policy = jsonencode({ Version = "2012-10-17" #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.block.body.terraform meta.function-call.arguments.terraform meta.braces.terraform