Files
work/term/.config/nvim/lua/plugins/none-ls.lua
T
2026-03-27 14:48:59 +01:00

25 lines
814 B
Lua

return {
"stevearc/conform.nvim",
config = function()
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
python = { "black" },
javascript = { "prettier", "eslint" },
javascriptreact = { "prettier", "eslint" },
jsx = { "prettier", "eslint" },
typescript = { "prettier", "eslint" },
typescriptreact = { "prettier", "eslint" },
sh = { "shfmt" },
},
format_on_save = {
timeout_ms = 500,
},
})
vim.keymap.set({ "n", "v" }, "<leader>lf", function()
require("conform").format({ async = true, lsp_fallback = true })
end, { desc = "Format buffer" })
end,
}