From a54064d940ee3a34f94d596602fc958eb5c2bfcb Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Sun, 16 Jan 2022 01:00:53 +0900 Subject: [PATCH] Add comments --- lua/cmp/utils/keymap.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/cmp/utils/keymap.lua b/lua/cmp/utils/keymap.lua index fa3de83..9171d64 100644 --- a/lua/cmp/utils/keymap.lua +++ b/lua/cmp/utils/keymap.lua @@ -122,6 +122,11 @@ keymap.listen = function(mode, lhs, callback) end ---Evacuate existing mapping. +--- NOTE: +--- In insert-mode, we should all mapping evacuate to the `` because `=` will display gabage message. +--- In cmdline-mode, we shouldn't re-map as `` because `cmap (map-to-tab)` will broke native behavior. +--- We should resolve recursive mapping because existing mapping will feed by `feedkeys` that doesn't solve recursive mapping. +--- We use `=` to solve recursive mapping. ---@param map table keymap.evacuate = setmetatable({ cache = cache.new(),