mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(formatting): remove deprecation check on some options
This commit is contained in:
parent
789b1b4fd4
commit
c16fb5d49b
1 changed files with 2 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue