From fc700acdf98516f3b019bce163bb55f72cad8a7d Mon Sep 17 00:00:00 2001
From: Luca Bilke <luca@asmara.fritz.box>
Date: Wed, 17 Jan 2024 16:44:25 +0100
Subject: [PATCH] fix gitsigns icons

---
 .config/nvim/lua/config/icons.lua          |  2 +-
 .config/nvim/lua/plugins/misc/gitsigns.lua | 35 +++++-----------------
 2 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/.config/nvim/lua/config/icons.lua b/.config/nvim/lua/config/icons.lua
index c7088d8c..47bc42a9 100644
--- a/.config/nvim/lua/config/icons.lua
+++ b/.config/nvim/lua/config/icons.lua
@@ -40,7 +40,7 @@ return {
         LineModified = "",
         LineRemoved = "",
         FileDeleted = "",
-        FileIgnored = "◌",
+        FileIgnored = "",
         FileRenamed = "",
         FileStaged = "S",
         FileUnmerged = "",
diff --git a/.config/nvim/lua/plugins/misc/gitsigns.lua b/.config/nvim/lua/plugins/misc/gitsigns.lua
index 3df674d3..58423f4d 100644
--- a/.config/nvim/lua/plugins/misc/gitsigns.lua
+++ b/.config/nvim/lua/plugins/misc/gitsigns.lua
@@ -16,35 +16,16 @@ M.keys = {
 
 M.ft = { "gitcommit" }
 
+local icons = require('config.icons')
+
 local opts = {
     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" },
-    },
-    signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
-    watch_gitdir = {
-        interval = 1000,
-        follow_files = true,
-    },
-    attach_to_untracked = true,
-    current_line_blame_opts = {
-        virt_text = true,
-        virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
-        delay = 1000,
-    },
-    sign_priority = 6,
-    update_debounce = 100,
-    status_formatter = nil, -- Use default
-    preview_config = {
-        -- Options passed to nvim_open_win
-        border = "single",
-        style = "minimal",
-        relative = "cursor",
-        row = 0,
-        col = 1,
+        add          = { text = icons.git.LineAdded },
+        change       = { text = icons.git.LineModified },
+        delete       = { text = icons.git.LineRemoved },
+        topdelete    = { text = icons.git.LineRemoved },
+        changedelete = { text = icons.git.FileRenamed },
+        untracked    = { text = icons.git.FileIgnored },
     },
 }