diff options
author | christianchiarulli <[email protected]> | 2021-07-13 20:31:49 -0400 |
---|---|---|
committer | christianchiarulli <[email protected]> | 2021-07-13 20:31:49 -0400 |
commit | ef44a4f3c67617cf079cc3afbc901f675d380217 (patch) | |
tree | aa0602a54c0e28ecba999b51b9bd0ff7629ca5dc /ftplugin/tf.lua | |
parent | 73cf3258d74cf2c7871db37d6825b23587fffe20 (diff) |
terraform formatter
Diffstat (limited to 'ftplugin/tf.lua')
-rw-r--r-- | ftplugin/tf.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ftplugin/tf.lua b/ftplugin/tf.lua index 7291cbd8..a328f7c2 100644 --- a/ftplugin/tf.lua +++ b/ftplugin/tf.lua @@ -1,3 +1,19 @@ +O.formatters.filetype["hcl"] = { + function() + return { + exe = O.lang.terraform.formatter.exe, + args = O.lang.terraform.formatter.args, + stdin = not (O.lang.terraform.formatter.stdin ~= nil), + } + end, +} +O.formatters.filetype["tf"] = O.formatters.filetype["hcl"] + +require("formatter.config").set_defaults { + logging = false, + filetype = O.formatters.filetype, +} + if require("lv-utils").check_lsp_client_active "terraformls" then return end |