summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/git.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/git.lua')
-rw-r--r--.config/nvim/lua/plugins/git.lua30
1 files changed, 22 insertions, 8 deletions
diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua
index 0e4d7f5..5f1c1e3 100644
--- a/.config/nvim/lua/plugins/git.lua
+++ b/.config/nvim/lua/plugins/git.lua
@@ -1,15 +1,27 @@
1return { 1return {
2 { 2 {
3 "purarue/gitsigns-yadm.nvim",
4 lazy = true,
5 },
6 {
3 "lewis6991/gitsigns.nvim", 7 "lewis6991/gitsigns.nvim",
8 event = { "BufReadPost", "VeryLazy" },
4 opts = { 9 opts = {
5 signs = { 10 signs = {
6 add = { text = '│' }, 11 add = { text = '│' },
7 change = { text = '' }, 12 change = { text = '~' },
8 delete = { text = '_' }, 13 delete = { text = '_' },
9 topdelete = { text = '‾' }, 14 topdelete = { text = '‾' },
10 changedelete = { text = '~' }, 15 changedelete = { text = '~' },
11 untracked = { text = '┆' }, 16 untracked = { text = '┆' },
12 }, 17 },
18 _on_attach_pre = function(_, callback)
19 if vim.fn.executable("yadm") == 1 then
20 require("gitsigns-yadm").yadm_signs(callback)
21 else
22 callback()
23 end
24 end,
13 signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` 25 signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
14 numhl = false, -- Toggle with `:Gitsigns toggle_numhl` 26 numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
15 linehl = false, -- Toggle with `:Gitsigns toggle_linehl` 27 linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
@@ -38,10 +50,6 @@ return {
38 row = 0, 50 row = 0,
39 col = 1 51 col = 1
40 }, 52 },
41 yadm = {
42 enable = true
43 },
44
45 on_attach = function(bufnr) 53 on_attach = function(bufnr)
46 local gs = package.loaded.gitsigns 54 local gs = package.loaded.gitsigns
47 55
@@ -89,7 +97,13 @@ return {
89 }, 97 },
90 }, 98 },
91 { 99 {
92 "tpope/vim-fugitive", 100 "NeogitOrg/neogit",
93 cmd = { 'Git', 'Gstatus', 'Gblame', 'Gpush', 'Gpull' }, 101 dependencies = {
94 }, 102 "nvim-lua/plenary.nvim", -- required
103 "sindrets/diffview.nvim", -- optional - Diff integration
104 "nvim-telescope/telescope.nvim", -- optional
105 },
106 cmd = "Neogit",
107 config = true
108 }
95} 109}