Merge branch 'master' into lua-hl-functions

This commit is contained in:
Thomas Vigouroux 2020-08-09 18:35:31 +02:00 committed by GitHub
commit 44f6aa85f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 9 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