From cbba08e24f2951a87248e502591447a0d33d0f92 Mon Sep 17 00:00:00 2001 From: pml68 Date: Tue, 22 Jul 2025 16:12:16 +0200 Subject: feat(guard.nvim): enable `taplo` formatter for TOML --- lua/pml68/plugins/guard.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lua/pml68/plugins') diff --git a/lua/pml68/plugins/guard.lua b/lua/pml68/plugins/guard.lua index bfae097..7f609de 100644 --- a/lua/pml68/plugins/guard.lua +++ b/lua/pml68/plugins/guard.lua @@ -3,20 +3,20 @@ return { dependencies = { "nvimdev/guard-collection" }, - ft = { "c", "cpp", "h", "json", "go", "lua" }, + ft = { "c", "cpp", "h", "toml", "json", "go", "lua" }, config = function() local ft = require("guard.filetype") ft("c,cpp,h"):fmt("clang-format") - ft("json"):fmt({ - cmd = "jq", - stdin = true - }) + ft("toml"):fmt("taplo") + ft("json"):fmt("jq") + ft("go"):fmt({ cmd = "golines", args = { "--max-len=80", "--base-formatter=gofumpt" }, stdin = true, }) + vim.g.guard_config = { fmt_on_save = true, lsp_as_default_formatter = true, -- cgit v1.2.3