From 71e4c13d7345ccb6f6c0c371f40e9dcb6569ade0 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Thu, 23 Jan 2025 13:21:08 +0100 Subject: feat: Sync --- lua/gabrielgio/formatter.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lua/gabrielgio/formatter.lua') diff --git a/lua/gabrielgio/formatter.lua b/lua/gabrielgio/formatter.lua index d06a400..ca0ebc7 100644 --- a/lua/gabrielgio/formatter.lua +++ b/lua/gabrielgio/formatter.lua @@ -1,5 +1,6 @@ local formatter = require("formatter") local go = require("formatter.filetypes.go") +local util = require("formatter.util") formatter.setup({ filetype = { @@ -8,6 +9,23 @@ formatter.setup({ fish = { require("formatter.filetypes.fish").fishindent }, javascript = { require("formatter.filetypes.javascript").prettier }, go = { go.gofumpt, go.goimports }, + terraform = { + function() + return { + exe = "terraform", + args = { + "fmt", + "-", + }, + stdin = true, + } + end, + }, + yaml = { + function() + return { exe = "yamlfmt" } + end, + }, }, ["*"] = { require("formatter.filetypes.any").remove_trailing_whitespace, -- cgit v1.2.3