From 9b7e849e8543690aaf89ee595f6b13fa456690bd Mon Sep 17 00:00:00 2001 From: Sassan Haradji Date: Fri, 25 Oct 2024 19:58:35 +0330 Subject: [PATCH] fix(configs): migrate to vim.islist as vim.tbl_islist is deprecated (#27) --- lua/deadcolumn/configs.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/deadcolumn/configs.lua b/lua/deadcolumn/configs.lua index 6aa5501..1995a6d 100644 --- a/lua/deadcolumn/configs.lua +++ b/lua/deadcolumn/configs.lua @@ -57,11 +57,12 @@ M.opts = { function M.set_options(user_opts) M.opts = vim.tbl_deep_extend('force', M.opts, user_opts or {}) + local islist = vim.islist or vim.tbl_islist -- Sanity check assert( type(M.opts.modes) == 'function' or type(M.opts.modes) == 'table' - and vim.tbl_islist(M.opts.modes --[[@as table]]), + and islist(M.opts.modes --[[@as table]]), 'modes must be a function or a list of strings' ) assert(