From f234580945779477679f1019780ddf5cd06fad1a Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Tue, 13 Jul 2021 20:22:07 +0300 Subject: [PATCH] neovim: add Neogit config --- home/.config/nvim/lua/colors/nord.lua | 12 ++++++++++++ home/.config/nvim/lua/plugins.lua | 21 ++++++++++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/home/.config/nvim/lua/colors/nord.lua b/home/.config/nvim/lua/colors/nord.lua index 12ce2d0..a060e63 100644 --- a/home/.config/nvim/lua/colors/nord.lua +++ b/home/.config/nvim/lua/colors/nord.lua @@ -308,6 +308,18 @@ local function highlight_plugins() hi('TelescopeMultiSelection', c.fg, c.grey2, 'bold', '') hi('TelescopeSelectionCaret', c.red, c.grey2, 'bold', '') hi('TelescopeMatching', c.purple, '', 'bold', '') + + -- Neogit + hi('NeogitBranch', c.purple, '', '', '') + hi('NeogitRemote', c.blue, '', '', '') + hi('NeogitHunkHeader', c.cyan, c.grey2, 'bold', '') + hi('NeogitHunkHeaderHighlight', c.yellow, c.grey2, 'bold', '') + hi('NeogitDiffContextHighlight', c.fg, c.grey2, '', '') + hi('NeogitDiffDeleteHighlight', c.red, c.grey2, '', '') + hi('NeogitDiffAddHighlight', c.green, c.grey2, '', '') + hi('NeogitNotificationInfo', c.green, '', '', '') + hi('NeogitNotificationWarning', c.yellow, '', '', '') + hi('NeogitNotificationError', c.red, '', '', '') end -- Main function diff --git a/home/.config/nvim/lua/plugins.lua b/home/.config/nvim/lua/plugins.lua index ad89f19..efd01fb 100644 --- a/home/.config/nvim/lua/plugins.lua +++ b/home/.config/nvim/lua/plugins.lua @@ -173,7 +173,7 @@ return require('packer').startup( require('octo').setup() end } - use { -- TODO: config + colors + use { 'TimUntersberger/neogit', cmd = 'Neogit', wants = { @@ -182,8 +182,23 @@ return require('packer').startup( }, requires = { {'nvim-lua/plenary.nvim', opt = true}, - {'sindrets/diffview.nvim', opt = true} - } + { + 'sindrets/diffview.nvim', + config = function() + require('diffview').setup { + diff_binaries = true + } + end, + opt = true + } + }, + config = function() + require('neogit').setup { + integrations = { + diffview = true + } + } + end } use { 'kristijanhusak/vim-dadbod-ui',