From 7d1dc654b6261ff938c622a7a2a684f194287d43 Mon Sep 17 00:00:00 2001 From: kang <1115610574@qq.com> Date: Mon, 3 Apr 2023 18:52:48 +0800 Subject: [PATCH] feat(keymap): use multi-mode mappings where possible (#605) --- lua/keymap/completion.lua | 3 +-- lua/modules/configs/ui/gitsigns.lua | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lua/keymap/completion.lua b/lua/keymap/completion.lua index 679a07a5a..364eb7598 100644 --- a/lua/keymap/completion.lua +++ b/lua/keymap/completion.lua @@ -26,8 +26,7 @@ local plug_map = { ["n|gr"] = map_cr("Lspsaga rename"):with_noremap():with_silent():with_desc("lsp: Rename in file range"), ["n|gR"] = map_cr("Lspsaga rename ++project"):with_noremap():with_silent():with_desc("lsp: Rename in project range"), ["n|K"] = map_cr("Lspsaga hover_doc"):with_noremap():with_silent():with_desc("lsp: Show doc"), - ["nv|ga"] = map_cr("Lspsaga code_action"):with_noremap():with_silent():with_desc("lsp: Code action for cursor"), - -- ["v|ga"] = map_cu("Lspsaga code_action"):with_noremap():with_silent():with_desc("lsp: Code action for range"), + ["nv|ga"] = map_cr("Lspsaga code_action"):with_noremap():with_silent():with_desc("lsp: Code action"), ["n|gd"] = map_cr("Lspsaga peek_definition"):with_noremap():with_silent():with_desc("lsp: Preview definition"), ["n|gD"] = map_cr("Lspsaga goto_definition"):with_noremap():with_silent():with_desc("lsp: Goto definition"), ["n|gp"] = map_cr("Lspsaga preview_definition"):with_noremap():with_silent():with_desc("lsp: Preview definition"), diff --git a/lua/modules/configs/ui/gitsigns.lua b/lua/modules/configs/ui/gitsigns.lua index b6d1554a3..d73a5e3f2 100644 --- a/lua/modules/configs/ui/gitsigns.lua +++ b/lua/modules/configs/ui/gitsigns.lua @@ -111,12 +111,7 @@ return function() :with_buffer(bufnr) :with_desc("git: Blame line"), -- Text objects - ["o|ih"] = bind - .map_callback(function() - require("gitsigns.actions").text_object() - end) - :with_buffer(bufnr), - ["x|ih"] = bind + ["ox|ih"] = bind .map_callback(function() require("gitsigns.actions").text_object() end)