-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Git commands via fugitive - Blame and diffs indications via Gitsigns EXTRA: Opened a pull request tpope/vim-fugitive#2288
- Loading branch information
1 parent
cf07688
commit ce942bf
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
return { | ||
{ | ||
"tpope/vim-fugitive", | ||
}, | ||
{ | ||
"lewis6991/gitsigns.nvim", | ||
config = function() | ||
require("gitsigns").setup({ | ||
-- Keymaps | ||
vim.keymap.set("n", "<leader>gp", ":Gitsigns preview_hunk<CR>", {}), | ||
|
||
signs = { | ||
add = { text = "┃" }, | ||
change = { text = "┃" }, | ||
delete = { text = "_" }, | ||
topdelete = { text = "‾" }, | ||
changedelete = { text = "~" }, | ||
untracked = { text = "┆" }, | ||
}, | ||
|
||
auto_attach = true, | ||
attach_to_untracked = false, | ||
watch_gitdir = { follow_files = 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` | ||
current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` | ||
current_line_blame_opts = { | ||
virt_text = true, | ||
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' | ||
delay = 1000, | ||
ignore_whitespace = false, | ||
virt_text_priority = 100, | ||
}, | ||
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>", | ||
current_line_blame_formatter_opts = { | ||
relative_time = false, | ||
}, | ||
sign_priority = 6, | ||
update_debounce = 100, | ||
status_formatter = nil, -- Use default | ||
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", | ||
row = 0, | ||
col = 1, | ||
}, | ||
}) | ||
end, | ||
}, | ||
} |