Skip to content

Commit

Permalink
Use proper titles and enablement for Terraform commands
Browse files Browse the repository at this point in the history
This adds HashiCorp to the command names to disambiguate commands contributed by this extension and align to the Terraform Cloud contributed commands.

It also only shows init current folder, validate, and plan if a terraform file is opened, as they only work if a terraform file is opened.
  • Loading branch information
jpogran committed Nov 28, 2023
1 parent 94975cf commit 3423729
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,32 +421,32 @@
"commands": [
{
"command": "terraform.generateBugReport",
"title": "Terraform: Generate Bug Report"
"title": "HashiCorp Terraform: Generate Bug Report"
},
{
"command": "terraform.enableLanguageServer",
"title": "Terraform: Enable Language Server"
"title": "HashiCorp Terraform: Enable Language Server"
},
{
"command": "terraform.disableLanguageServer",
"title": "Terraform: Disable Language Server"
"title": "HashiCorp Terraform: Disable Language Server"
},
{
"command": "terraform.init",
"title": "Terraform: init"
"title": "HashiCorp Terraform: init"
},
{
"command": "terraform.initCurrent",
"title": "Terraform: init current folder",
"title": "HashiCorp Terraform: init current folder",
"icon": "$(cloud-download)"
},
{
"command": "terraform.validate",
"title": "Terraform: validate"
"title": "HashiCorp Terraform: validate"
},
{
"command": "terraform.plan",
"title": "Terraform: plan"
"title": "HashiCorp Terraform: plan"
},
{
"command": "terraform.modules.refreshList",
Expand Down Expand Up @@ -544,15 +544,15 @@
},
{
"command": "terraform.initCurrent",
"when": "config.terraform.languageServer.enable == true"
"when": "config.terraform.languageServer.enable == true && editorLangId == terraform"
},
{
"command": "terraform.validate",
"when": "config.terraform.languageServer.enable == true"
"when": "config.terraform.languageServer.enable == true && editorLangId == terraform"
},
{
"command": "terraform.plan",
"when": "config.terraform.languageServer.enable == true"
"when": "config.terraform.languageServer.enable == true && editorLangId == terraform"
},
{
"command": "terraform.modules.refreshList",
Expand Down

0 comments on commit 3423729

Please sign in to comment.