From e674db4ca140dab82952cc53710b7a76aa81bfe7 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 15 May 2024 09:50:50 -0500 Subject: [PATCH] fix: correctly check for legacy setup --- lua/nvim-ts-autotag/config/plugin.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/nvim-ts-autotag/config/plugin.lua b/lua/nvim-ts-autotag/config/plugin.lua index 29765a5..1e53045 100644 --- a/lua/nvim-ts-autotag/config/plugin.lua +++ b/lua/nvim-ts-autotag/config/plugin.lua @@ -142,10 +142,12 @@ local Setup = { --- Do general plugin setup ---@param opts nvim-ts-autotag.PluginSetup function Setup.setup(opts) + opts = opts or {} if Setup.did_setup then return end - if opts and not opts.opts then + ---@diagnostic disable-next-line: undefined-field + if opts.enable_rename or opts.enable_close or opts.enable_close_on_slash then vim.notify( "nvim-ts-autotag: Using the legacy setup opts! Please migrate to the new setup options layout as this will eventually have its support removed in 1.0.0!", vim.log.levels.WARN