mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-28 10:18:25 -05:00
neovim: lazy-load some plugins
Also rebind mappings for GitSigns
This commit is contained in:
parent
e1b2a23507
commit
d1be74ee0b
@ -94,9 +94,9 @@ wk.register({
|
||||
g = {
|
||||
name = 'Git',
|
||||
b = 'Blame current line',
|
||||
i = 'Preview hunk',
|
||||
n = 'Next hunk',
|
||||
p = 'Previous hunk',
|
||||
j = 'Next hunk',
|
||||
k = 'Previous hunk',
|
||||
p = 'Preview hunk',
|
||||
r = 'Reset hunk',
|
||||
R = 'Reset all hunks in buffer',
|
||||
s = 'Stage hunk',
|
||||
|
@ -12,8 +12,8 @@ return require('gitsigns').setup {
|
||||
noremap = true,
|
||||
buffer = true,
|
||||
|
||||
['n <leader>gn'] = {expr = true, '&diff ? \'<leader>gn\' : \'<cmd>lua require"gitsigns.actions".next_hunk()<CR>\''},
|
||||
['n <leader>gp'] = {expr = true, '&diff ? \'<leader>gp\' : \'<cmd>lua require"gitsigns.actions".prev_hunk()<CR>\''},
|
||||
['n <leader>gj'] = {expr = true, '&diff ? \'<leader>gj\' : \'<cmd>lua require"gitsigns.actions".next_hunk()<CR>\''},
|
||||
['n <leader>gk'] = {expr = true, '&diff ? \'<leader>gk\' : \'<cmd>lua require"gitsigns.actions".prev_hunk()<CR>\''},
|
||||
|
||||
['n <leader>gs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
|
||||
['v <leader>gs'] = '<cmd>lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>',
|
||||
@ -21,7 +21,7 @@ return require('gitsigns').setup {
|
||||
['n <leader>gr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
|
||||
['v <leader>gr'] = '<cmd>lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>',
|
||||
['n <leader>gR'] = '<cmd>lua require"gitsigns".reset_buffer()<CR>',
|
||||
['n <leader>gi'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
||||
['n <leader>gp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
||||
['n <leader>gb'] = '<cmd>lua require"gitsigns".blame_line(true)<CR>'
|
||||
},
|
||||
watch_index = {
|
||||
|
@ -60,6 +60,7 @@ return packer.startup(
|
||||
use {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
requires = 'nvim-lua/plenary.nvim',
|
||||
event = {'BufRead', 'BufNewFile'},
|
||||
config = function()
|
||||
require('modules.gitgutter')
|
||||
end
|
||||
@ -76,6 +77,7 @@ return packer.startup(
|
||||
}
|
||||
use {
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
event = 'BufRead',
|
||||
config = function()
|
||||
require('modules.blankline')
|
||||
end
|
||||
@ -112,7 +114,7 @@ return packer.startup(
|
||||
-- Editing
|
||||
use {
|
||||
'terrortylor/nvim-comment',
|
||||
cmd = 'CommentToggle',
|
||||
after = 'nvim-treesitter',
|
||||
config = function()
|
||||
require('nvim_comment').setup()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user