fix(formatting): remove deprecation check on some options
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user