From 767ae28f4f43b3ee21a9315a4bc0361e36e2f1a2 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Sun, 31 Mar 2024 16:29:50 +0530 Subject: [PATCH] nvim: plugins: Drop gitsigns --- nvim/.config/nvim/after/plugin/gitsigns.lua | 66 --------------------- nvim/.config/nvim/lua/plugins.lua | 1 - 2 files changed, 67 deletions(-) delete mode 100644 nvim/.config/nvim/after/plugin/gitsigns.lua diff --git a/nvim/.config/nvim/after/plugin/gitsigns.lua b/nvim/.config/nvim/after/plugin/gitsigns.lua deleted file mode 100644 index 884456b..0000000 --- a/nvim/.config/nvim/after/plugin/gitsigns.lua +++ /dev/null @@ -1,66 +0,0 @@ -require('gitsigns').setup { - status_formatter = nil, - sign_priority = 6, - update_debounce = 100, - max_file_length = 10000, - signcolumn = true, - numhl = false, - linehl = false, - word_diff = false, - attach_to_untracked = false, - current_line_blame = false, - watch_gitdir = { - follow_files = true - }, - preview_config = { - -- Options passed to nvim_open_win - border = 'single', - style = 'minimal', - relative = 'cursor', - row = 0, - col = 1 - }, - yadm = { - enable = false - }, - signs = { - add = { text = '+' }, - change = { text = '│' }, - delete = { text = '-' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - on_attach = function(bufnr) - local gs = package.loaded.gitsigns - - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) - end - - map('n', ']c', function() - if vim.wo.diff then return ']c' end - vim.schedule(function() gs.next_hunk() end) - return '' - end, {expr=true}) - - map('n', '[c', function() - if vim.wo.diff then return '[c' end - vim.schedule(function() gs.prev_hunk() end) - return '' - end, {expr=true}) - - map('n', 'hp', gs.preview_hunk) - map('n', 'hP', gs.preview_hunk_inline) - map('n', 'hl', gs.setloclist) - map('n', 'hq', gs.setqflist) - map('n', 'hQ', function() gs.setqflist('attached') end) - map('n', 'ht', gs.toggle_signs) - map('n', 'hu', gs.undo_stage_hunk) - - map({'n', 'v'}, 'hs', ':Gitsigns stage_hunk') - map({'n', 'v'}, 'hr', ':Gitsigns reset_hunk') - map({'o', 'x'}, 'ih', ':Gitsigns select_hunk') - end -} diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 9f5c72a..8d72883 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -10,7 +10,6 @@ require "paq" { 'dcampos/nvim-snippy' , 'honza/vim-snippets' , -- Git - 'lewis6991/gitsigns.nvim' , 'tpope/vim-fugitive' , 'SanchayanMaity/gitlinker.nvim' , -- Quickfix