From ed58168ae2ecb6aede6841425c3a205aacc5f822 Mon Sep 17 00:00:00 2001 From: abxh <83485102+abxh@users.noreply.github.com> Date: Sun, 15 Sep 2024 12:53:06 +0200 Subject: [PATCH] fix: keymaps config helper (#340) * fix: keymaps config helper * update readme --- README.md | 2 +- lua/lsp_signature/helper.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8134262..09b247b 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ e.g. -- e.g. move_cursor_key = '', -- once moved to floating window, you can use , to move cursor up and down keymaps = {} -- relate to move_cursor_key; the keymaps inside floating window - -- e.g. keymaps = { 'j', 'j' } this map j to j in floating window + -- e.g. keymaps = { { 'j', 'j' }, } this map j to j in floating window -- and are default keymaps to move cursor up and down } diff --git a/lua/lsp_signature/helper.lua b/lua/lsp_signature/helper.lua index 493c767..fe4bfbd 100644 --- a/lua/lsp_signature/helper.lua +++ b/lua/lsp_signature/helper.lua @@ -844,7 +844,7 @@ helper.set_keymaps = function(winnr, bufnr) end if maps and type(maps) == 'table' then for _, map in ipairs(maps) do - vim.keymap.set('i', map.lhs, map.rhs, { buffer = bufnr }) + vim.keymap.set('i', map[1], map[2], { buffer = bufnr }) end end end