Terraform.tmLanguage
Terraform.tmLanguage copied to clipboard
Format configuration files upon saving
Would you consider adding an option to format configuration files upon saving a file?
For reference https://www.terraform.io/docs/cli/commands/fmt.html or https://github.com/terraform-linters/tflint
For further reference, this project does this: https://github.com/tmichel/sublime-terraform
It should be easy enough to back port from the fork. Open a PR?
FYI This is available in the language server, which can be used alongside this plugin: https://github.com/hashicorp/terraform-ls
See https://github.com/sublimelsp/LSP and https://github.com/hashicorp/terraform-ls/blob/main/docs/USAGE.md#sublime-text-2
You may also need to configure the auto-formatting on-save via lsp_format_on_save: true
https://github.com/sublimelsp/LSP/blob/f5952e6fb660163c3110aa435baf15c2d0adb93c/LSP.sublime-settings#L11