Skip to content

Commit dbc6fcd

Browse files
committed
feat(tfsearch): TF-26847 TF-27259: Added: support for .tfquery.hcl file
1 parent a1a469c commit dbc6fcd

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

assets/icons/terraform_search.svg

Lines changed: 11 additions & 0 deletions
Loading

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,20 @@
144144
"dark": "assets/icons/terraform_stacks.svg",
145145
"light": "assets/icons/terraform_stacks.svg"
146146
}
147+
},
148+
{
149+
"id": "terraform-search",
150+
"aliases": [
151+
"Terraform Search"
152+
],
153+
"extensions": [
154+
".tfquery.hcl"
155+
],
156+
"configuration": "./language-configuration.json",
157+
"icon": {
158+
"dark": "assets/icons/terraform_search.svg",
159+
"light": "assets/icons/terraform_search.svg"
160+
}
147161
},
148162
{
149163
"id": "json",
@@ -182,6 +196,11 @@
182196
"language": "terraform-mock",
183197
"scopeName": "source.hcl",
184198
"path": "./syntaxes/hcl.tmGrammar.json"
199+
},
200+
{
201+
"language": "terraform-search",
202+
"scopeName": "source.hcl",
203+
"path": "./syntaxes/hcl.tmGrammar.json"
185204
}
186205
],
187206
"semanticTokenTypes": [

src/extension.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const documentSelector: DocumentSelector = [
4646
{ scheme: 'file', language: 'terraform-deploy' },
4747
{ scheme: 'file', language: 'terraform-test' },
4848
{ scheme: 'file', language: 'terraform-mock' },
49+
{ scheme: 'file', language: 'terraform-search' },
4950
];
5051
const outputChannel = vscode.window.createOutputChannel(brand);
5152
const tfcOutputChannel = vscode.window.createOutputChannel('HCP Terraform');
@@ -94,6 +95,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
9495
vscode.workspace.createFileSystemWatcher('**/*.tfdeploy.hcl'),
9596
vscode.workspace.createFileSystemWatcher('**/*.tftest.hcl'),
9697
vscode.workspace.createFileSystemWatcher('**/*.tfmock.hcl'),
98+
vscode.workspace.createFileSystemWatcher('**/*.tfquery.hcl'),
9799
],
98100
},
99101
diagnosticCollectionName: 'HashiCorpTerraform',

src/status/language.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const lsStatus = vscode.languages.createLanguageStatusItem('terraform-ls.status'
1212
{ language: 'terraform-deploy' },
1313
{ language: 'terraform-test' },
1414
{ language: 'terraform-mock' },
15+
{ language: 'terraform-search' },
1516
]);
1617
lsStatus.name = 'Terraform LS';
1718
lsStatus.detail = 'Terraform LS';

0 commit comments

Comments
 (0)