From f38e8dc0c9ad0296ead6e83aaf8ec3a360c7470b Mon Sep 17 00:00:00 2001 From: Rob Owens Date: Mon, 14 Feb 2022 08:08:16 -0600 Subject: [PATCH] Resolve issue with tfvars comment toggling (#937) This fixes tfvar file detection by adding the tfvar language and file extension to the activationEvents array. This ensures that even if a folder is opened with only tfvar files in it, our extension is activated. It also adds the language-configuration file to the tfvars language contribution section, which enables language features like comment toggling. Co-authored-by: James Pogran --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 09053ebaf..98affe649 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,10 @@ }, "activationEvents": [ "onLanguage:terraform", + "onLanguage:terraform-vars", "onView:terraform-modules", "workspaceContains:**/*.tf", + "workspaceContains:**/*.tfvars", "onCommand:terraform.enableLanguageServer" ], "main": "./out/extension", @@ -61,7 +63,8 @@ "id": "terraform-vars", "extensions": [ ".tfvars" - ] + ], + "configuration": "./language-configuration.json" }, { "id": "json",