From 0f9fd84a9742e22294cfaf46f32bad9b29de0b31 Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Tue, 24 Nov 2020 15:29:46 -0500 Subject: [PATCH] fix: Use noremap when mapping. (#286) Previously, if e.g. : was remapped, Telescope would be unclosable with its mappings (). (Do the same for ensuring we :silent) --- lua/telescope/mappings.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/telescope/mappings.lua b/lua/telescope/mappings.lua index 766f861..499be3e 100644 --- a/lua/telescope/mappings.lua +++ b/lua/telescope/mappings.lua @@ -94,9 +94,9 @@ local telescope_map = function(prompt_bufnr, mode, key_bind, key_func, opts) return end - opts = opts or { - silent = true - } + opts = opts or {} + if opts.noremap == nil then opts.noremap = true end + if opts.silent == nil then opts.silent = true end if type(key_func) == "string" then a.nvim_buf_set_keymap(