aboutsummaryrefslogtreecommitdiff
path: root/lua/gabrielgio/formatter.lua
diff options
context:
space:
mode:
authorGabriel A. Giovanini <g.giovanini@gridx.de>2025-04-29 16:44:15 +0200
committerGabriel A. Giovanini <g.giovanini@gridx.de>2025-04-29 16:44:15 +0200
commit1434c1daf599f2703fd5951556283d4856127005 (patch)
tree71582839060550319507b6a54123735fec7a2f46 /lua/gabrielgio/formatter.lua
parentece1b9ec93416683717f4308f62ac154f3e9d045 (diff)
downloadgabrielgio.lua-1434c1daf599f2703fd5951556283d4856127005.tar.gz
gabrielgio.lua-1434c1daf599f2703fd5951556283d4856127005.tar.bz2
gabrielgio.lua-1434c1daf599f2703fd5951556283d4856127005.zip
feat: SyncHEADmaster
Diffstat (limited to 'lua/gabrielgio/formatter.lua')
-rw-r--r--lua/gabrielgio/formatter.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/gabrielgio/formatter.lua b/lua/gabrielgio/formatter.lua
index 5c13d89..893b837 100644
--- a/lua/gabrielgio/formatter.lua
+++ b/lua/gabrielgio/formatter.lua
@@ -13,17 +13,28 @@ local function terraformfmt()
}
end
+local function tspfmt()
+ return {
+ exe = "tsp",
+ args = {
+ "format",
+ },
+ }
+end
+
formatter.setup({
filetype = {
nix = { require("formatter.filetypes.nix").alejandra },
lua = { require("formatter.filetypes.lua").stylua },
fish = { require("formatter.filetypes.fish").fishindent },
javascript = { require("formatter.filetypes.javascript").prettier },
+ typescript = { require("formatter.filetypes.javascript").prettier },
css = { require("formatter.filetypes.css").cssbeautify },
scss = { require("formatter.filetypes.css").cssbeautify },
go = { go.gofumpt, go.goimports },
terraform = { terraformfmt },
yaml = { require("formatter.filetypes.yaml").yamlfmt },
+ typespec = { tspfmt },
},
["*"] = {
require("formatter.filetypes.any").remove_trailing_whitespace,