Add terraform formatter

This commit is contained in:
Terje Larsen 2019-08-15 23:06:12 +02:00
parent 4e9f797210
commit 20c5ace107
No known key found for this signature in database
GPG key ID: A88B401A8DB3C7D6

View file

@ -418,7 +418,8 @@ argument, a buffer containing the output of the formatter."
(defcustom apheleia-formatters
'((black . ("black" "-"))
(prettier . (npx "prettier" file))
(gofmt . ("gofmt")))
(gofmt . ("gofmt"))
(terraform . ("terraform" "fmt" "-")))
"Alist of code formatting commands.
The keys may be any symbols you want, and the values are
commands, lists of strings and symbols, in the format of
@ -442,7 +443,8 @@ commands, lists of strings and symbols, in the format of
(sass-mode . prettier)
(typescript-mode . prettier)
(web-mode . prettier)
(yaml-mode . prettier))
(yaml-mode . prettier)
(terraform-mode . terraform))
"Alist mapping major mode names to formatters to use in those modes.
This determines what formatter to use in buffers without a
setting for `apheleia-formatter'. The keys are major mode