Add support for more formatter's, stylua config.
This commit is contained in:
parent
24f7bb50b6
commit
ccc9ffa2db
19 changed files with 472 additions and 420 deletions
14
after/plugin/conform.lua
Normal file
14
after/plugin/conform.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
local conform = require("conform")
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
python = { "isort", "black" },
|
||||
lua = { "stylua" },
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<leader>f", function()
|
||||
conform.format({
|
||||
lsp_fallback = true,
|
||||
})
|
||||
end, { desc = "Format file or range (in visual mode)" })
|
Loading…
Add table
Add a link
Reference in a new issue