From ba5b30b1367622e2bc11afb50f243e7e051a4e77 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 14 Oct 2021 09:00:00 +0100 Subject: [PATCH] feat(nvim): use lewis6991/gitsigns.nvim Replace airblade/vim-gitgutter with lewis6991/gitsigns. --- nvim/.config/nvim/lua/opdavies/init.lua | 1 + .../nvim/lua/opdavies/plugins/signs.lua | 23 +++++++++++++++++++ nvim/.config/nvim/plugins.vim | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 nvim/.config/nvim/lua/opdavies/plugins/signs.lua diff --git a/nvim/.config/nvim/lua/opdavies/init.lua b/nvim/.config/nvim/lua/opdavies/init.lua index 8e24d15..6224484 100644 --- a/nvim/.config/nvim/lua/opdavies/init.lua +++ b/nvim/.config/nvim/lua/opdavies/init.lua @@ -3,4 +3,5 @@ require("colorbuddy").colorscheme("gruvbuddy") require "opdavies.plugins.completion" require "opdavies.plugins.indent-blankline" require "opdavies.plugins.lsp" +require "opdavies.plugins.signs" require "opdavies.plugins.treesitter" diff --git a/nvim/.config/nvim/lua/opdavies/plugins/signs.lua b/nvim/.config/nvim/lua/opdavies/plugins/signs.lua new file mode 100644 index 0000000..faa948b --- /dev/null +++ b/nvim/.config/nvim/lua/opdavies/plugins/signs.lua @@ -0,0 +1,23 @@ +require "colorbuddy" + +local c = require("colorbuddy.color").colors +local Group = require("colorbuddy.group").Group + +Group.new("GitSignsAdd", c.green) +Group.new("GitSignsChange", c.yellow) +Group.new("GitSignsDelete", c.red) + +require 'gitsigns'.setup { + linehl = false, + numhl = true, + + signs = { + add = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr" }, + change = { hl = "GitSignsChange", text = "│", numhl = "GitSignsChangeNr" }, + delete = { hl = "GitSignsDelete", text = "_", numhl = "GitSignsDeleteNr" }, + topdelete = { hl = "GitSignsDelete", text = "‾", numhl = "GitSignsDeleteNr" }, + changedelete = { hl = "GitSignsDelete", text = "~", numhl = "GitSignsChangeNr" }, + }, + + word_diff = false, +} diff --git a/nvim/.config/nvim/plugins.vim b/nvim/.config/nvim/plugins.vim index abb2c0a..b53533a 100644 --- a/nvim/.config/nvim/plugins.vim +++ b/nvim/.config/nvim/plugins.vim @@ -1,10 +1,10 @@ " Utilities -Plug 'airblade/vim-gitgutter' Plug 'cakebaker/scss-syntax.vim' Plug 'christoomey/vim-sort-motion' Plug 'christoomey/vim-tmux-navigator' Plug 'editorconfig/editorconfig-vim' Plug 'icatalina/vim-case-change' +Plug 'lewis6991/gitsigns.nvim' Plug 'lukas-reineke/indent-blankline.nvim' Plug 'machakann/vim-highlightedyank' Plug 'mattn/emmet-vim'