disable linter auto-format on save
This commit is contained in:
@@ -1,33 +1,30 @@
|
|||||||
return {
|
return {
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("conform").setup({
|
require("conform").setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
python = { "black" },
|
python = { "black" },
|
||||||
javascript = { "prettier", "eslint" },
|
javascript = { "prettier", "eslint" },
|
||||||
javascriptreact = { "prettier", "eslint" },
|
javascriptreact = { "prettier", "eslint" },
|
||||||
jsx = { "prettier", "eslint" },
|
jsx = { "prettier", "eslint" },
|
||||||
typescript = { "prettier", "eslint" },
|
typescript = { "prettier", "eslint" },
|
||||||
typescriptreact = { "prettier", "eslint" },
|
typescriptreact = { "prettier", "eslint" },
|
||||||
vue = { "prettier" },
|
vue = { "prettier" },
|
||||||
json = { "prettier" },
|
json = { "prettier" },
|
||||||
jsonc = { "prettier" },
|
jsonc = { "prettier" },
|
||||||
html = { "prettier" },
|
html = { "prettier" },
|
||||||
css = { "prettier" },
|
css = { "prettier" },
|
||||||
scss = { "prettier" },
|
scss = { "prettier" },
|
||||||
yaml = { "prettier" },
|
yaml = { "prettier" },
|
||||||
markdown = { "prettier" },
|
markdown = { "prettier" },
|
||||||
sh = { "shfmt" },
|
sh = { "shfmt" },
|
||||||
bash = { "shfmt" },
|
bash = { "shfmt" },
|
||||||
},
|
},
|
||||||
format_on_save = {
|
})
|
||||||
timeout_ms = 500,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>lf", function()
|
vim.keymap.set({ "n", "v" }, "<leader>lf", function()
|
||||||
require("conform").format({ async = true, lsp_fallback = true })
|
require("conform").format({ async = true, lsp_fallback = true })
|
||||||
end, { desc = "Format buffer" })
|
end, { desc = "Format buffer" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user