From 1550f128bdabec8171eea82e38a02cf8bfda84e7 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 15 May 2024 02:09:50 -0500 Subject: [PATCH] refactor: simplify internal setup --- lua/nvim-ts-autotag/internal.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lua/nvim-ts-autotag/internal.lua b/lua/nvim-ts-autotag/internal.lua index 6cf229a..80b71da 100644 --- a/lua/nvim-ts-autotag/internal.lua +++ b/lua/nvim-ts-autotag/internal.lua @@ -152,15 +152,9 @@ M.setup = function(opts) opts = opts or {} M.tbl_filetypes = opts.filetypes or M.tbl_filetypes M.tbl_skipTag = opts.skip_tag or M.tbl_skipTag - if opts.enable_rename ~= nil then - M.enable_rename = opts.enable_rename - end - if opts.enable_close ~= nil then - M.enable_close = opts.enable_close - end - if opts.enable_close_on_slash ~= nil then - M.enable_close_on_slash = opts.enable_close_on_slash - end + M.enable_rename = opts.enable_rename or M.enable_rename + M.enable_close = opts.enable_close or M.enable_close + M.enable_close_on_slash = opts.enable_close_on_slash or M.enable_close_on_slash did_setup = true end