From ced6df31bb55307022cd9673dabcec1f0a92d35c Mon Sep 17 00:00:00 2001 From: Charles Danesi Date: Wed, 20 Nov 2024 10:27:12 -0500 Subject: [PATCH] improve gitsigns settings change add symbol back to + enabled highlighting the line number of changed lines enabled highlighting changed WORDS fixed line blame to be less intrusive (aligned to right of window now) --- .config/nvim/lua/plugins/gitsigns.lua | 29 +++++++++++---------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns.lua index 4e592c4..fce9396 100644 --- a/.config/nvim/lua/plugins/gitsigns.lua +++ b/.config/nvim/lua/plugins/gitsigns.lua @@ -19,21 +19,15 @@ return { end end, signs = { - add = { text = "┃" }, + add = { text = "+" }, change = { text = "┃" }, delete = { text = "_" }, topdelete = { text = "‾" }, changedelete = { text = "~" }, untracked = { text = "┆" }, - -- add = { text = "+" }, - -- change = { text = "│" }, - -- delete = { text = "_" }, - -- topdelete = { text = "‾" }, - -- changedelete = { text = "~" }, - -- untracked = { text = "┆" }, }, signs_staged = { - add = { text = "┃" }, + add = { text = "+" }, change = { text = "┃" }, delete = { text = "_" }, topdelete = { text = "‾" }, @@ -41,19 +35,21 @@ return { 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` + signcolumn = true, + numhl = true, + linehl = false, + word_diff = true, + show_deleted = false, -- turning this off for now as it seems to be slowing down neovim on MBP watch_gitdir = { interval = 1000, follow_files = true, }, - attach_to_untracked = true, - current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` + attach_to_untracked = false, + current_line_blame = true, current_line_blame_opts = { + use_focus = true, virt_text = true, - virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' + virt_text_pos = "right_align", delay = 200, ignore_whitespace = false, }, @@ -61,9 +57,8 @@ return { sign_priority = 6, update_debounce = 100, status_formatter = nil, -- Use default - max_file_length = 40000, -- Disable if file is longer than this (in lines) + max_file_length = 40000, preview_config = { - -- Options passed to nvim_open_win border = "single", style = "minimal", relative = "cursor",