From f1ed8506d0e9899b519b9b426c697b6a92f98bf1 Mon Sep 17 00:00:00 2001 From: Hawtian Wang Date: Tue, 23 Apr 2024 11:14:46 +0800 Subject: [PATCH] ... --- lua/dotvim/bootstrap.lua | 4 ++-- lua/dotvim/core/action.lua | 2 +- lua/dotvim/utils/tbl.lua | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/dotvim/bootstrap.lua b/lua/dotvim/bootstrap.lua index 9e052839..b58ab582 100644 --- a/lua/dotvim/bootstrap.lua +++ b/lua/dotvim/bootstrap.lua @@ -92,7 +92,7 @@ function M.setup() local all_keys if plugin.keys == nil then all_keys = {} - elseif vim.tbl_isarray(plugin.keys) then + elseif vim.isarray(plugin.keys) then all_keys = plugin.keys --[[ @as LazyKeysSpec[] ]] else all_keys = { plugin.keys } @@ -100,7 +100,7 @@ function M.setup() local actions if type(plugin.actions) == "function" then actions = plugin.actions() - elseif vim.tbl_isarray(plugin.actions) then + elseif vim.isarray(plugin.actions) then actions = plugin.actions else actions = { plugin.actions } diff --git a/lua/dotvim/core/action.lua b/lua/dotvim/core/action.lua index b9f496f5..536fc503 100644 --- a/lua/dotvim/core/action.lua +++ b/lua/dotvim/core/action.lua @@ -53,7 +53,7 @@ function Action:into_lazy_keys_spec() }, } end - if not vim.tbl_isarray(keys) then + if not vim.isarray(keys) then keys = { keys } end diff --git a/lua/dotvim/utils/tbl.lua b/lua/dotvim/utils/tbl.lua index 67f558ef..9204fa10 100644 --- a/lua/dotvim/utils/tbl.lua +++ b/lua/dotvim/utils/tbl.lua @@ -30,7 +30,7 @@ function M.list_reverse(lst) end local function normalize_search_table(tbl) - if vim.tbl_isarray(tbl) then + if vim.isarray(tbl) then local ret = {} for _, v in ipairs(tbl) do ret[#ret + 1] = v @@ -62,7 +62,7 @@ function M.flatten_array(tbl) return { tbl } end - if vim.tbl_isarray(tbl) then + if vim.isarray(tbl) then local res = {} for _, value in ipairs(tbl) do local inner_value = M.flatten_array(value)