Neovim - Change mappings to add git ones

This commit is contained in:
mequidis
2021-12-07 18:08:08 +02:00
parent b6cd7627e0
commit 3ffb5696fa
2 changed files with 12 additions and 8 deletions

View File

@ -71,10 +71,6 @@ noremap('n', '<leader>tl', ':Telescope lsp_dynamic_workspace_symbols<CR>')
noremap('n', '<leader>to', ':Telescope oldfiles<CR>')
noremap('n', '<leader>tg', ':Telescope live_grep<CR>')
noremap('n', '<leader>ts', ':Telescope treesitter<CR>')
noremap('n', '<leader>tm', ':Telescope git_status<CR>')
noremap('n', '<leader>tb', ':Telescope git_branches<CR>')
noremap('n', '<leader>tc', ':Telescope git_commits<CR>')
noremap('n', '<leader>tf', ':Telescope git_files<CR>')
-- code
noremap('n', '<leader>gf', ':Neoformat<CR>')
@ -104,6 +100,12 @@ noremap('n', '<leader>dh', ':Telescope dap commands<CR>')
noremap('n', '<leader>dp', ':Telescope dap list_breakpoints<CR>')
noremap('n', '<leader>du', ":lua require'dapui'.toggle()<CR>")
-- git
noremap('n', '<leader>vs', ':Git<CR>')
noremap('n', '<leader>vb', ':Telescope git_branches<CR>')
noremap('n', '<leader>vc', ':Telescope git_commits<CR>')
noremap('n', '<leader>vf', ':Telescope git_files<CR>')
-- vsnip jumpable mappings
map('i', '<Tab>', "vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'", {expr = true})
map('s', '<Tab>', "vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'", {expr = true})

View File

@ -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",