From c16fb5d49bfe10041fb36f6ac80a755767b9e6bf Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 22:48:26 +0200 Subject: [PATCH] fix(formatting): remove deprecation check on some options --- lua/lazyvim/plugins/formatting.lua | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) 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