---@type LazySpec
return { {
	'lewis6991/gitsigns.nvim', -- adds git signs to the signcolumn
	event = 'VeryLazy',
	opts = {
		signs_staged_enable     = true, -- whether staged statuses are enabled
		signcolumn              = true, -- the signs enable/disable based on the signcolumn state
		current_line_blame      = true, -- show the blame of the current line
		current_line_blame_opts = {
			delay             = 50, -- delay in MS before blame is shown
			ignore_whitespace = true, -- whether to ignore whitespace
			use_focus         = true, -- whether to only enable when the buffer is in focus
		},
		signs                   = { -- signs when working
			add          = { text = '+' },
			change       = { text = '~' },
			delete       = { text = '_' },
			topdelete    = { text = '‾' },
			changedelete = { text = '~' },
			untracked    = { text = '┆' },
		},
		signs_staged            = { -- signs when staged
			add          = { text = 'A' },
			change       = { text = 'M' },
			delete       = { text = 'D' },
			topdelete    = { text = 'D' },
			changedelete = { text = 'M' },
			untracked    = { text = 'U' },
		},
		attach_to_untracked     = true, -- shows untracked files' signcolumn
	},
	config = function(_, opts)
		require('gitsigns').setup(opts)

		local palette = _G.userdat.palette
		local bg = vim.api.nvim_get_hl(0, { name = 'SignColumn' }).bg
		for n, fg in pairs {
			GitSignsAdd                = palette.bright_green,
			GitSignsChange             = palette.bright_orange,
			GitSignsDelete             = palette.bright_red,
			GitSignsTopdelete          = palette.bright_red,
			GitSignsChangedelete       = palette.bright_orange,
			GitSignsUntracked          = palette.bright_aqua,
			GitSignsStagedAdd          = palette.neutral_green,
			GitSignsStagedChange       = palette.neutral_orange,
			GitSignsStagedDelete       = palette.neutral_red,
			GitSignsStagedTopDelete    = palette.neutral_red,
			GitSignsStagedChangedelete = palette.neutral_orange,
			GitSignsStagedUntracked    = palette.neutral_aqua,
		} do
			vim.api.nvim_set_hl(0, n, { fg = fg, bg = bg })
		end
	end,
} }
