From 7d4051064cdada658774756ec1bcc5aa7a866d38 Mon Sep 17 00:00:00 2001 From: phanium <91544758+phanen@users.noreply.github.com> Date: Sat, 2 Nov 2024 12:39:41 +0800 Subject: [PATCH] fix: make work again (#2073) * fix: make work again * fix: also --- lua/cmp/utils/keymap.lua | 4 ++-- lua/cmp/utils/keymap_spec.lua | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/cmp/utils/keymap.lua b/lua/cmp/utils/keymap.lua index b7d151c37..0fb8692e4 100644 --- a/lua/cmp/utils/keymap.lua +++ b/lua/cmp/utils/keymap.lua @@ -8,7 +8,7 @@ local keymap = {} ---@param keys string ---@return string keymap.t = function(keys) - return (string.gsub(keys, '(<[A-Za-z0-9\\%-%[%]%^@]->)', function(match) + return (string.gsub(keys, '(<[A-Za-z0-9\\%-%[%]%^@;_]->)', function(match) return vim.api.nvim_eval(string.format([["\%s"]], match)) end)) end @@ -17,7 +17,7 @@ end ---@param keys string ---@return string keymap.normalize = vim.fn.has('nvim-0.8') == 1 and function(keys) - local t = string.gsub(keys, '<([A-Za-z0-9\\%-%[%]%^@]-)>', function(match) + local t = string.gsub(keys, '<([A-Za-z0-9\\%-%[%]%^@;_]-)>', function(match) -- Use the \<* notation, which distinguishes from , etc. return vim.api.nvim_eval(string.format([["\<*%s>"]], match)) end) diff --git a/lua/cmp/utils/keymap_spec.lua b/lua/cmp/utils/keymap_spec.lua index 959783f34..9f60e6345 100644 --- a/lua/cmp/utils/keymap_spec.lua +++ b/lua/cmp/utils/keymap_spec.lua @@ -16,6 +16,8 @@ describe('keymap', function() '', '', '', + '', + '', '', '', '(example)',