From 39b90334540bb39068a2587c4c113a7489df016b Mon Sep 17 00:00:00 2001 From: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Date: Thu, 20 Jun 2024 01:09:42 +0800 Subject: [PATCH] fix(gitsigns): upstream breaking changes See https://github.com/lewis6991/gitsigns.nvim/commit/3d7e49c201537ee0293a1a3abe67b67f8e7648a5 Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/modules/configs/ui/gitsigns.lua | 45 +++++++---------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/lua/modules/configs/ui/gitsigns.lua b/lua/modules/configs/ui/gitsigns.lua index c70684266..de14cd5f5 100644 --- a/lua/modules/configs/ui/gitsigns.lua +++ b/lua/modules/configs/ui/gitsigns.lua @@ -2,45 +2,22 @@ return function() local mapping = require("keymap.ui") require("modules.utils").load_plugin("gitsigns", { signs = { - add = { - hl = "GitSignsAdd", - text = "│", - numhl = "GitSignsAddNr", - linehl = "GitSignsAddLn", - }, - change = { - hl = "GitSignsChange", - text = "│", - numhl = "GitSignsChangeNr", - linehl = "GitSignsChangeLn", - }, - delete = { - hl = "GitSignsDelete", - text = "_", - numhl = "GitSignsDeleteNr", - linehl = "GitSignsDeleteLn", - }, - topdelete = { - hl = "GitSignsDelete", - text = "‾", - numhl = "GitSignsDeleteNr", - linehl = "GitSignsDeleteLn", - }, - changedelete = { - hl = "GitSignsChange", - text = "~", - numhl = "GitSignsChangeNr", - linehl = "GitSignsChangeLn", - }, + add = { text = "┃" }, + change = { text = "┃" }, + delete = { text = "_" }, + topdelete = { text = "‾" }, + changedelete = { text = "~" }, + untracked = { text = "┆" }, }, + auto_attach = true, on_attach = mapping.gitsigns, - watch_gitdir = { interval = 1000, follow_files = true }, - current_line_blame = true, - current_line_blame_opts = { delay = 1000, virtual_text_pos = "eol" }, + signcolumn = true, sign_priority = 6, update_debounce = 100, - status_formatter = nil, -- Use default word_diff = false, + current_line_blame = true, diff_opts = { internal = true }, + watch_gitdir = { follow_files = true }, + current_line_blame_opts = { delay = 1000, virt_text = true, virtual_text_pos = "eol" }, }) end