diff options
| author | pml68 <contact@pml68.me> | 2024-11-29 23:28:27 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.me> | 2024-11-29 23:28:27 +0100 |
| commit | 82a1c1e251210f4805dec8f6d59a6ab2c6791334 (patch) | |
| tree | c2db695fe2767ff314319a490c833bebd30f99a8 /lua/pml68/plugins/guard.lua | |
| parent | feat: remove deprecated API call (diff) | |
| download | nvim-82a1c1e251210f4805dec8f6d59a6ab2c6791334.tar.gz | |
feat: split plugins.lua into manageable "chunks"
Diffstat (limited to 'lua/pml68/plugins/guard.lua')
| -rw-r--r-- | lua/pml68/plugins/guard.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lua/pml68/plugins/guard.lua b/lua/pml68/plugins/guard.lua new file mode 100644 index 0000000..9f033b3 --- /dev/null +++ b/lua/pml68/plugins/guard.lua @@ -0,0 +1,20 @@ +return { + "nvimdev/guard.nvim", + dependencies = { + "nvimdev/guard-collection" + }, + event = { "BufReadPost", "BufNewFile" }, + config = function() + local ft = require("guard.filetype") + + ft("c,cpp,h"):fmt("clang-format") + ft("json"):fmt({ + cmd = "jq", + stdin = true + }) + vim.g.guard_config = { + fmt_on_save = true, + lsp_as_default_formatter = true + } + end +} |
