diff options
author | shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> | 2022-01-07 18:17:19 +0600 |
---|---|---|
committer | shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> | 2022-02-27 08:21:21 +0600 |
commit | c031e038df8429e14b0aa608aaa77068daa680f0 (patch) | |
tree | f8f7be25f1ccb818db4706b2adbb64c779607be1 /runtime/lua/vim/keymap.lua | |
parent | 0347875a5c11258ebb6377a1ab79b04fe9c55bc9 (diff) | |
download | rneovim-c031e038df8429e14b0aa608aaa77068daa680f0.tar.gz rneovim-c031e038df8429e14b0aa608aaa77068daa680f0.tar.bz2 rneovim-c031e038df8429e14b0aa608aaa77068daa680f0.zip |
chore: remove <Plug> detection from vim.keymap
Diffstat (limited to 'runtime/lua/vim/keymap.lua')
-rw-r--r-- | runtime/lua/vim/keymap.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/keymap.lua b/runtime/lua/vim/keymap.lua index d53b790746..df49eff4b6 100644 --- a/runtime/lua/vim/keymap.lua +++ b/runtime/lua/vim/keymap.lua @@ -42,7 +42,7 @@ local keymap = {} --- |nvim_replace_termcodes()| is applied to the result of Lua expr maps. --- - remap: (boolean) Make the mapping recursive. This is the --- inverse of the "noremap" option from |nvim_set_keymap()|. ---- Default `true` if `lhs` is a string starting with `<plug>` (case-insensitive), `false` otherwise. +--- Default `false`. ---@see |nvim_set_keymap()| function keymap.set(mode, lhs, rhs, opts) vim.validate { @@ -66,8 +66,8 @@ function keymap.set(mode, lhs, rhs, opts) opts.replace_keycodes = nil if opts.remap == nil then - -- remap by default on <plug> mappings and don't otherwise. - opts.noremap = is_rhs_luaref or rhs:lower():match("^<plug>") == nil + -- default remap value is false + opts.noremap = true else -- remaps behavior is opposite of noremap option. opts.noremap = not opts.remap |