Skip to content

Commit

Permalink
fix(api): Use nvim_buf_del_keymap() instead of nop() for cpp.
Browse files Browse the repository at this point in the history
Signed-off-by: Guennadi Maximov C <[email protected]>
  • Loading branch information
DrKJeff16 committed Sep 1, 2024
1 parent 319b7dd commit f4c1512
Showing 1 changed file with 11 additions and 24 deletions.
35 changes: 11 additions & 24 deletions lua/user_api/util/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -364,30 +364,17 @@ function M.assoc()
map_dict(Keys, 'wk.register', false, 'n', 0)

-- Kill plugin-defined mappings
vim.schedule(function()
local nop = require('user_api.maps').nop

nop({
'ih',
'is',
'ihn',
}, {
noremap = true,
silent = true,
buffer = 0,
nowait = true,
}, 'i', '<leader>')
nop({
'ih',
'is',
'ihn',
}, {
noremap = true,
silent = true,
buffer = 0,
nowait = true,
}, 'n', '<leader>')
end)
local nop = vim.api.nvim_buf_del_keymap

local i_del = {
'ih',
'is',
'ihn',
}

for _, lhs in next, i_del do
nop(0, 'i', lhs)
end
end,
},
{
Expand Down

0 comments on commit f4c1512

Please sign in to comment.