From 3e4c795cec32481bc6d0b30c05125fdf7ef2d412 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 6 Jun 2024 09:28:35 +0200 Subject: [PATCH] fix(keys): never lazy-load `` or empty rhs keymaps --- lua/lazy/core/handler/keys.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazy/core/handler/keys.lua b/lua/lazy/core/handler/keys.lua index bafc205f..a6e9475a 100644 --- a/lua/lazy/core/handler/keys.lua +++ b/lua/lazy/core/handler/keys.lua @@ -109,6 +109,10 @@ function M:_add(keys) ---@param buf? number local function add(buf) + if type(keys.rhs) == "string" and (keys.rhs == "" or keys.rhs:lower() == "") then + return self:_set(keys, buf) + end + vim.keymap.set(keys.mode, lhs, function() local plugins = self.active[keys.id]