nvim-config

Log | Files | Refs | Submodules | README

commit a96d2fa4befc0c1c313a5a8699fc2f22380e709b
parent db64713c0a60aa3c7b06d9b17390fe055bd97c58
Author: Thomas Vigouroux <tomvig38@gmail.com>
Date:   Thu, 16 Dec 2021 16:21:59 +0100

feat: add neogit

Diffstat:
Mafter/plugin/mappings.vim | 4+++-
Mlua/completree-config.lua | 1+
Mlua/neogit-config.lua | 17+++++++++++++++++
Mlua/plugins.lua | 1+
4 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/after/plugin/mappings.vim b/after/plugin/mappings.vim @@ -1,4 +1,4 @@ -" Last Change: 2021 Dec 08 +" Last Change: 2021 Dec 16 vnoremap <silent> < <gv vnoremap <silent> > >gv @@ -33,3 +33,5 @@ nnoremap gp :silent %!prettier --stdin-filepath % --trailing-comma all --single- nnoremap <Leader>zs <cmd>1Zest search<CR> nnoremap <Leader>zc <cmd>Zest create<CR> + +nnoremap <Leader>g <cmd>Neogit<CR> diff --git a/lua/completree-config.lua b/lua/completree-config.lua @@ -57,6 +57,7 @@ comp.setup { -- For git commit and text only do luasnip gitcommit = cdef.luasnip, + NeogitCommitMessage = cdef.luasnip, text = cdef.luasnip, markdown = md_complete } diff --git a/lua/neogit-config.lua b/lua/neogit-config.lua @@ -1,4 +1,5 @@ local gitsigns = require'gitsigns' +local neogit = require'neogit' gitsigns.setup { current_line_blame = true, @@ -6,3 +7,19 @@ gitsigns.setup { delay = 1000, } } + +neogit.setup { + disable_commit_confirmation = true, + integrations = { + diffview = true + }, + sections = { + untracked = { + folded = true, + } + } +} + +require'diffview'.setup { + use_icons = false +} diff --git a/lua/plugins.lua b/lua/plugins.lua @@ -73,6 +73,7 @@ return packer.startup(function(use) require'colorizer'.setup() end} use 'lewis6991/impatient.nvim' + use { 'TimUntersberger/neogit', requires = {'nvim-lua/plenary.nvim', 'sindrets/diffview.nvim' } } -- Git because git use { 'lewis6991/gitsigns.nvim', requires = { 'nvim-lua/plenary.nvim' } }