disable linter auto-format on save
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user