fix(nvim): conform remove javascript auto format
This commit is contained in:
@@ -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,
|
||||||
|
|
||||||
@@ -13,13 +13,19 @@ return {
|
|||||||
|
|
||||||
sh = { "shfmt" },
|
sh = { "shfmt" },
|
||||||
|
|
||||||
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
|
||||||
timeout_ms = 500,
|
if filetype == "javascript" then
|
||||||
lsp_fallback = true,
|
return nil
|
||||||
},
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_fallback = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user