diff options
| -rw-r--r-- | lua/pml68/configs/mason.lua | 1 | ||||
| -rw-r--r-- | lua/pml68/plugins/guard.lua | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lua/pml68/configs/mason.lua b/lua/pml68/configs/mason.lua index 7da62dc..a317aaa 100644 --- a/lua/pml68/configs/mason.lua +++ b/lua/pml68/configs/mason.lua @@ -6,6 +6,7 @@ return { "lua-language-server", "clangd", "clang-format", + "taplo", "jq", "json-lsp", "svelte-language-server", 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, |
