mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
fix(conform): dont try to merge formatter functions
This commit is contained in:
parent
2f16a7b2d9
commit
9f034ab106
1 changed files with 4 additions and 2 deletions
|
@ -44,8 +44,10 @@ return {
|
|||
config = function(_, opts)
|
||||
opts.formatters = opts.formatters or {}
|
||||
for f, o in pairs(opts.formatters) do
|
||||
local ok, formatter = pcall(require, "conform.formatters." .. f)
|
||||
opts.formatters[f] = vim.tbl_deep_extend("force", {}, ok and formatter or {}, o)
|
||||
if type(o) ~= "function" then
|
||||
local ok, formatter = pcall(require, "conform.formatters." .. f)
|
||||
opts.formatters[f] = vim.tbl_deep_extend("force", {}, ok and formatter or {}, o)
|
||||
end
|
||||
end
|
||||
require("conform").setup(opts)
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue