From fb6f4b7690e4af38a8d2d758d10fcedfa9b8963a Mon Sep 17 00:00:00 2001 From: Hawtian Wang Date: Mon, 29 Apr 2024 23:26:32 +0800 Subject: [PATCH] ... --- lua/dotvim/bootstrap.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/dotvim/bootstrap.lua b/lua/dotvim/bootstrap.lua index b58ab582..9a9d3d4e 100644 --- a/lua/dotvim/bootstrap.lua +++ b/lua/dotvim/bootstrap.lua @@ -84,6 +84,7 @@ function M.setup() for _, _plugin in pairs(require("lazy.core.config").spec.plugins) do local plugin = _plugin --[[@as dotvim.core.plugin.PluginOption]] if + ---@diagnostic disable-next-line: undefined-field (plugin._.kind ~= "disabled" or plugin._.kind ~= "clean") and plugin.actions ~= nil then @@ -92,20 +93,25 @@ function M.setup() local all_keys if plugin.keys == nil then all_keys = {} + ---@diagnostic disable-next-line: param-type-mismatch elseif vim.isarray(plugin.keys) then all_keys = plugin.keys --[[ @as LazyKeysSpec[] ]] else + ---@diagnostic disable-next-line: assign-type-mismatch all_keys = { plugin.keys } end local actions if type(plugin.actions) == "function" then actions = plugin.actions() + ---@diagnostic disable-next-line: param-type-mismatch elseif vim.isarray(plugin.actions) then actions = plugin.actions else actions = { plugin.actions } end + ---@diagnostic disable-next-line: param-type-mismatch for _, action_spec in ipairs(actions) do + ---@diagnostic disable-next-line: param-type-mismatch local action = Core.action.new_action(action_spec) Core.registry.register_action(action) vim.list_extend(all_keys, action:into_lazy_keys_spec())