From 353f5a5c06627ef9acea3a1b914171a534c2f826 Mon Sep 17 00:00:00 2001 From: omri Date: Sat, 8 Jul 2023 15:20:41 +0300 Subject: [PATCH] Neovim - Change mappings to add git ones --- .config/nvim/lua/mappings.lua | 10 ++++++---- .config/nvim/lua/plugins/whichkey.lua | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua index 583f4b5..8962cbe 100644 --- a/.config/nvim/lua/mappings.lua +++ b/.config/nvim/lua/mappings.lua @@ -71,10 +71,6 @@ noremap('n', 'tl', ':Telescope lsp_dynamic_workspace_symbols') noremap('n', 'to', ':Telescope oldfiles') noremap('n', 'tg', ':Telescope live_grep') noremap('n', 'ts', ':Telescope treesitter') -noremap('n', 'tm', ':Telescope git_status') -noremap('n', 'tb', ':Telescope git_branches') -noremap('n', 'tc', ':Telescope git_commits') -noremap('n', 'tf', ':Telescope git_files') -- code noremap('n', 'gf', ':Neoformat') @@ -104,6 +100,12 @@ noremap('n', 'dh', ':Telescope dap commands') noremap('n', 'dp', ':Telescope dap list_breakpoints') noremap('n', 'du', ":lua require'dapui'.toggle()") +-- git +noremap('n', 'vs', ':Git') +noremap('n', 'vb', ':Telescope git_branches') +noremap('n', 'vc', ':Telescope git_commits') +noremap('n', 'vf', ':Telescope git_files') + -- vsnip jumpable mappings map('i', '', "vsnip#jumpable(1) ? '(vsnip-jump-next)' : ''", {expr = true}) map('s', '', "vsnip#jumpable(1) ? '(vsnip-jump-next)' : ''", {expr = true}) diff --git a/.config/nvim/lua/plugins/whichkey.lua b/.config/nvim/lua/plugins/whichkey.lua index 6a64321..079c913 100644 --- a/.config/nvim/lua/plugins/whichkey.lua +++ b/.config/nvim/lua/plugins/whichkey.lua @@ -52,10 +52,12 @@ wk.register({ o = "Old Files", g = "Grep", s = "Treesitter", - m = "Git Status", - b = "Git Branches", - c = "Git Commits", - f = "Git Files" + }, + v = { + name = "Git", + s = "Status", + b = "Branches", + f = "Files", }, C = "Terminal", F = "Fuzzy Files",