2023-12-24 19:46:29 +01:00
|
|
|
local conform = require("conform")
|
|
|
|
|
|
|
|
conform.setup({
|
|
|
|
formatters_by_ft = {
|
|
|
|
python = { "isort", "black" },
|
|
|
|
lua = { "stylua" },
|
2023-12-24 20:54:49 +01:00
|
|
|
sh = { "shfmt" },
|
|
|
|
bash = { "shfmt" },
|
2023-12-24 19:46:29 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
vim.keymap.set({ "n", "v" }, "<leader>f", function()
|
|
|
|
conform.format({
|
|
|
|
lsp_fallback = true,
|
|
|
|
})
|
|
|
|
end, { desc = "Format file or range (in visual mode)" })
|