Add noremap option to mappings

This commit is contained in:
Rafał Camlet 2020-08-06 12:09:20 +02:00 committed by Thomas Vigouroux
parent dccc250add
commit 3c7528a294
4 changed files with 5 additions and 5 deletions

View file

@ -105,7 +105,7 @@ function M.attach(bufnr)
mode = 'v'
end
local cmd = string.format(":lua require'nvim-treesitter.incremental_selection'.%s()<CR>", funcname)
api.nvim_buf_set_keymap(buf, mode, mapping, cmd, { silent = true })
api.nvim_buf_set_keymap(buf, mode, mapping, cmd, { silent = true, noremap = true })
end
end

View file

@ -56,7 +56,7 @@ function M.attach(bufnr)
for fn_name, mapping in pairs(config.keymaps) do
local cmd = string.format([[:lua require'nvim-treesitter.refactor.navigation'.%s(%d)<CR>]], fn_name, bufnr)
api.nvim_buf_set_keymap(bufnr, 'n', mapping, cmd, { silent = true })
api.nvim_buf_set_keymap(bufnr, 'n', mapping, cmd, { silent = true, noremap = true })
end
end

View file

@ -51,7 +51,7 @@ function M.attach(bufnr)
for fn_name, mapping in pairs(config.keymaps) do
local cmd = string.format([[:lua require'nvim-treesitter.refactor.smart_rename'.%s(%d)<CR>]], fn_name, bufnr)
api.nvim_buf_set_keymap(bufnr, 'n', mapping, cmd, { silent = true })
api.nvim_buf_set_keymap(bufnr, 'n', mapping, cmd, { silent = true, noremap = true })
end
end

View file

@ -86,8 +86,8 @@ function M.attach(bufnr, lang)
end
if query then
local cmd = ":lua require'nvim-treesitter.textobjects'.select_textobject('"..query.."')<CR>"
api.nvim_buf_set_keymap(buf, "o", mapping, cmd, {silent = true})
api.nvim_buf_set_keymap(buf, "v", mapping, cmd, {silent = true})
api.nvim_buf_set_keymap(buf, "o", mapping, cmd, {silent = true, noremap = true })
api.nvim_buf_set_keymap(buf, "v", mapping, cmd, {silent = true, noremap = true })
end
end
end