From 1434c1daf599f2703fd5951556283d4856127005 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Tue, 29 Apr 2025 16:44:15 +0200 Subject: feat: Sync --- lua/gabrielgio/formatter.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lua/gabrielgio/formatter.lua') 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, -- cgit v1.2.3