From 2683c52b6c0d5915ad673c24400bba3f7e955706 Mon Sep 17 00:00:00 2001 From: charitarthchugh <37895518+charitarthchugh@users.noreply.github.com> Date: Thu, 18 Jul 2024 18:08:13 -0400 Subject: [PATCH] Update gitsigns.nvim to resolve depreciations --- config/nvim/lua/user/gitsigns.lua | 54 +++++++++++++++++-------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/config/nvim/lua/user/gitsigns.lua b/config/nvim/lua/user/gitsigns.lua index ff72b93..bfc9f43 100644 --- a/config/nvim/lua/user/gitsigns.lua +++ b/config/nvim/lua/user/gitsigns.lua @@ -5,44 +5,50 @@ end gitsigns.setup { 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 = '┆' }, }, - signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + signs_staged = { + add = { text = '┃' }, + change = { text = '┃' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' }, + }, + signs_staged_enable = true, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` watch_gitdir = { - interval = 1000, - follow_files = true, + follow_files = true }, - attach_to_untracked = true, + auto_attach = true, + attach_to_untracked = false, current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` current_line_blame_opts = { virt_text = true, - virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' delay = 1000, ignore_whitespace = false, + virt_text_priority = 100, }, - current_line_blame_formatter_opts = { - relative_time = false, - }, + current_line_blame_formatter = ', - ', sign_priority = 6, update_debounce = 100, status_formatter = nil, -- Use default - max_file_length = 40000, + max_file_length = 40000, -- Disable if file is longer than this (in lines) preview_config = { -- Options passed to nvim_open_win - border = "single", - style = "minimal", - relative = "cursor", + border = 'single', + style = 'minimal', + relative = 'cursor', row = 0, - col = 1, - }, - yadm = { - enable = false, + col = 1 }, }