From ec62a5cee85f841089ed3e8528dc0cc33a060ca6 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Sun, 15 May 2022 15:41:27 +0200 Subject: [PATCH] fix: handle bug when which-key is not installed --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 327ba24..6bb985f 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -124,7 +124,7 @@ nvchad.no_WhichKey_map = function() if not vim.tbl_contains(ignore_modes, mode) then for keybind, cmd in pairs(keymap) do -- disabled keys will not have cmd set - if cmd ~= "" then + if cmd ~= "" and cmd[1] then nvchad.map(mode, keybind, cmd[1]) end end