disable linter auto-format on save

This commit is contained in:
2026-04-11 12:30:20 +02:00
parent aa634a19ef
commit 469e8d3b63
+27 -30
View File
@@ -1,33 +1,30 @@
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" },
vue = { "prettier" },
json = { "prettier" },
jsonc = { "prettier" },
html = { "prettier" },
css = { "prettier" },
scss = { "prettier" },
yaml = { "prettier" },
markdown = { "prettier" },
sh = { "shfmt" },
bash = { "shfmt" },
},
format_on_save = {
timeout_ms = 500,
},
})
"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" },
vue = { "prettier" },
json = { "prettier" },
jsonc = { "prettier" },
html = { "prettier" },
css = { "prettier" },
scss = { "prettier" },
yaml = { "prettier" },
markdown = { "prettier" },
sh = { "shfmt" },
bash = { "shfmt" },
},
})
vim.keymap.set({ "n", "v" }, "<leader>lf", function()
require("conform").format({ async = true, lsp_fallback = true })
end, { desc = "Format buffer" })
end,
vim.keymap.set({ "n", "v" }, "<leader>lf", function()
require("conform").format({ async = true, lsp_fallback = true })
end, { desc = "Format buffer" })
end,
}