Skip to content

Commit

Permalink
fix: keymaps config helper (#340)
Browse files Browse the repository at this point in the history
* fix: keymaps config helper

* update readme
  • Loading branch information
abxh authored Sep 15, 2024
1 parent 7d62bf9 commit ed58168
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ e.g.
-- e.g. move_cursor_key = '<M-p>',
-- once moved to floating window, you can use <M-d>, <M-u> to move cursor up and down
keymaps = {} -- relate to move_cursor_key; the keymaps inside floating window
-- e.g. keymaps = { 'j', '<C-o>j' } this map j to <C-o>j in floating window
-- e.g. keymaps = { { 'j', '<C-o>j' }, } this map j to <C-o>j in floating window
-- <M-d> and <M-u> are default keymaps to move cursor up and down
}

Expand Down
2 changes: 1 addition & 1 deletion lua/lsp_signature/helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed58168

Please sign in to comment.