Skip to content

Commit

Permalink
fix(configs): migrate to vim.islist as vim.tbl_islist is deprecated (#27
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sassanh authored Oct 25, 2024
1 parent af13928 commit 9b7e849
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/deadcolumn/configs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9b7e849

Please sign in to comment.