diff --git a/lua/lazyvim/plugins/formatting.lua b/lua/lazyvim/plugins/formatting.lua index 28dea8ed..0935f6b3 100644 --- a/lua/lazyvim/plugins/formatting.lua +++ b/lua/lazyvim/plugins/formatting.lua @@ -2,27 +2,10 @@ local M = {} ---@param opts ConformOpts function M.setup(_, opts) - for name, formatter in pairs(opts.formatters or {}) do - if type(formatter) == "table" then - ---@diagnostic disable-next-line: undefined-field - if formatter.extra_args then - ---@diagnostic disable-next-line: undefined-field - formatter.prepend_args = formatter.extra_args - LazyVim.deprecate( - ("opts.formatters.%s.extra_args"):format(name), - ("opts.formatters.%s.prepend_args"):format(name) - ) - end - end - end - for _, key in ipairs({ "format_on_save", "format_after_save" }) do if opts[key] then - LazyVim.warn( - ("Don't set `opts.%s` for `conform.nvim`.\n**LazyVim** will use the conform formatter automatically"):format( - key - ) - ) + local msg = "Don't set `opts.%s` for `conform.nvim`.\n**LazyVim** will use the conform formatter automatically" + LazyVim.warn(msg:format(key)) ---@diagnostic disable-next-line: no-unknown opts[key] = nil end