From 2cd5db254b7bf500828c84cd1d00dbf77fed5a0d Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 8 Aug 2024 10:12:52 +0200 Subject: nvim: update gitsigns yadm support --- .config/nvim/lua/plugins/git.lua | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to '.config/nvim/lua/plugins') diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua index 0e4d7f5..2267cbd 100644 --- a/.config/nvim/lua/plugins/git.lua +++ b/.config/nvim/lua/plugins/git.lua @@ -1,15 +1,27 @@ return { + { + "seanbreckenridge/gitsigns-yadm.nvim", + lazy = true, + }, { "lewis6991/gitsigns.nvim", + event = { "BufReadPost", "VeryLazy" }, opts = { signs = { add = { text = '│' }, - change = { text = '│' }, + change = { text = '~' }, delete = { text = '_' }, topdelete = { text = '‾' }, changedelete = { text = '~' }, untracked = { text = '┆' }, }, + _on_attach_pre = function(_, callback) + if vim.fn.executable("yadm") == 1 then + require("gitsigns-yadm").yadm_signs(callback) + else + callback() + end + end, signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` numhl = false, -- Toggle with `:Gitsigns toggle_numhl` linehl = false, -- Toggle with `:Gitsigns toggle_linehl` @@ -38,10 +50,6 @@ return { row = 0, col = 1 }, - yadm = { - enable = true - }, - on_attach = function(bufnr) local gs = package.loaded.gitsigns -- cgit v1.2.3-70-g09d2