Skip to content

Commit afdce37

Browse files
committed
Add support for vars, stack, deploy and search
Correctly identify different types of terraform files: - terraform-vars - terraform-stack - terraform-deploy - terraform-search Fixes: - hashicorp/terraform-ls#1838 Refs: - https://github.com/hashicorp/terraform-ls/blob/c20eef80eac1d158e0fc45d7f6de23602104a3f8/docs/language-clients.md#language-ids
1 parent 520498f commit afdce37

13 files changed

+18
-1
lines changed

ftdetect/hcl.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@
33
silent! autocmd! filetypedetect BufRead,BufNewFile *.tf
44
autocmd BufRead,BufNewFile *.hcl,*.tfbackend set filetype=hcl
55
autocmd BufRead,BufNewFile .terraformrc,terraform.rc set filetype=hcl
6-
autocmd BufRead,BufNewFile *.tf,*.tofu,*.tfvars,*.tftest.hcl,*.tofutest.hcl set filetype=terraform
6+
autocmd BufRead,BufNewFile *.tfcomponent.hcl,*.tfstack.hcl set filetype=terraform-stack
7+
autocmd BufRead,BufNewFile *.tfdeploy.hcl set filetype=terraform-deploy
8+
autocmd BufRead,BufNewFile *.tfquery.hcl set filetype=terraform-search
9+
autocmd BufRead,BufNewFile *.tfvars set filetype=terraform-vars
10+
autocmd BufRead,BufNewFile *.tf,*.tofu,*.tftest.hcl,*.tofutest.hcl set filetype=terraform
711
autocmd BufRead,BufNewFile *.tfstate,*.tfstate.backup set filetype=json
12+
"

ftplugin/terraform-deploy.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
runtime! ftplugin/terraform.vim

ftplugin/terraform-search.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
runtime! ftplugin/terraform.vim

ftplugin/terraform-stack.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
runtime! ftplugin/terraform.vim

ftplugin/terraform-vars.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
runtime! ftplugin/terraform.vim

indent/terraform-deploy.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
runtime! indent/terraform.vim

indent/terraform-search.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
runtime! indent/terraform.vim

indent/terraform-stack.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
runtime! indent/terraform.vim

indent/terraform-vars.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
runtime! indent/terraform.vim

syntax/terraform-deploy.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
runtime! syntax/terraform.vim

0 commit comments

Comments
 (0)