mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 20:00:07 -04:00
Add noremap option to mappings
This commit is contained in:
parent
dccc250add
commit
3c7528a294
4 changed files with 5 additions and 5 deletions
|
|
@ -105,7 +105,7 @@ function M.attach(bufnr)
|
||||||
mode = 'v'
|
mode = 'v'
|
||||||
end
|
end
|
||||||
local cmd = string.format(":lua require'nvim-treesitter.incremental_selection'.%s()<CR>", funcname)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ function M.attach(bufnr)
|
||||||
for fn_name, mapping in pairs(config.keymaps) do
|
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)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ function M.attach(bufnr)
|
||||||
|
|
||||||
for fn_name, mapping in pairs(config.keymaps) do
|
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)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,8 @@ function M.attach(bufnr, lang)
|
||||||
end
|
end
|
||||||
if query then
|
if query then
|
||||||
local cmd = ":lua require'nvim-treesitter.textobjects'.select_textobject('"..query.."')<CR>"
|
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, "o", mapping, cmd, {silent = true, noremap = true })
|
||||||
api.nvim_buf_set_keymap(buf, "v", mapping, cmd, {silent = true})
|
api.nvim_buf_set_keymap(buf, "v", mapping, cmd, {silent = true, noremap = true })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue