fix(nvim): conform remove javascript auto format

This commit is contained in:
Oliver
2025-07-20 12:57:36 +02:00
parent 7866057c8f
commit d06b050bbd

View File

@@ -1,6 +1,6 @@
return { return {
"stevearc/conform.nvim", "stevearc/conform.nvim",
event = 'BufWritePre', -- uncomment for format on save event = "BufWritePre",
opts = { opts = {
lsp_fallback = true, lsp_fallback = true,
@@ -16,10 +16,16 @@ return {
go = { "goimports", "gofumpt" }, go = { "goimports", "gofumpt" },
}, },
format_on_save = { format_on_save = function(bufnr)
-- These options will be passed to conform.format() local filetype = vim.bo[bufnr].filetype
if filetype == "javascript" then
return nil
end
return {
timeout_ms = 500, timeout_ms = 500,
lsp_fallback = true, lsp_fallback = true,
}, }
end,
}, },
} }