aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/format.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua/plugins/format.lua')
-rw-r--r--nvim/lua/plugins/format.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua
new file mode 100644
index 0000000..bdfaf03
--- /dev/null
+++ b/nvim/lua/plugins/format.lua
@@ -0,0 +1,20 @@
1return {
2 "stevearc/conform.nvim",
3 event = { "BufReadPre", "BufNewFile" },
4 opts = {
5 formatters_by_ft = {
6 sh = { "shfmt" }, -- brew install
7 bash = { "shfmt" },
8 python = { "ruff_format", "black" }, -- brew install ruff
9 lua = { "stylua" }, -- brew install stylua
10 typescript = { "prettierd", "prettier" },
11 javascript = { "prettierd", "prettier" },
12 json = { "jq" }, -- brew install jq
13 -- cpp = { "clang_format" },
14 },
15 },
16
17 config = function(_, opts)
18 require("conform").setup(opts)
19 end,
20}