20 lines
424 B
Lua
20 lines
424 B
Lua
return {
|
|
"stevearc/conform.nvim",
|
|
opts = {},
|
|
config = function()
|
|
require("conform").setup({
|
|
formatters_by_ft = {
|
|
lua = { "stylua" },
|
|
python = { "isort", "ruff_format" },
|
|
},
|
|
})
|
|
vim.api.nvim_set_keymap(
|
|
"n",
|
|
"<Leader>f",
|
|
":lua require('conform').format()<CR>",
|
|
{ noremap = true, silent = true }
|
|
)
|
|
end,
|
|
keys = "<leader>f", -- Optionally specify here to load the plugin on this keypress
|
|
}
|