Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .tofu and .tofutest.hcl to list of extensions #193

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

muru
Copy link

@muru muru commented Sep 30, 2024

OpenTofu 1.8 adds support for .tofu files which override .tf files of the same name. The syntax is still the same, so we can apply the usual terraform filetype configuration to these files as well.

OpenTofu 1.8 adds support for `.tofu` files which override `.tf` files of the same name. The syntax is still the same, so we can apply the usual `terraform` filetype configuration to these files as well.
@RoseSecurity
Copy link

Good stuff!

ftdetect/hcl.vim Outdated
@@ -3,5 +3,5 @@
silent! autocmd! filetypedetect BufRead,BufNewFile *.tf
autocmd BufRead,BufNewFile *.hcl,*.tfbackend set filetype=hcl
autocmd BufRead,BufNewFile .terraformrc,terraform.rc set filetype=hcl
autocmd BufRead,BufNewFile *.tf,*.tfvars,*.tftest.hcl set filetype=terraform
autocmd BufRead,BufNewFile *.tf,*.tofu,*.tfvars,*.tftest.hcl set filetype=terraform
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not also .tofutest.hcl?

seems inconsistent to want .tf and .tofu to be equivalent, but not to want .tftest.hcl and .tofutest.hcl to be equivalent

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dimbleby sure, I have no problem with that, and added it now. I didn't add it mainly because I don't use Terraform tests, so it never crossed my mind.

ftdetect/hcl.vim Outdated Show resolved Hide resolved
@muru muru changed the title Add .tofu to list of extensions Add .tofu and .tofutest.hcl to list of extensions Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants