-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitsigns.lua
59 lines (57 loc) · 1.67 KB
/
gitsigns.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
local M = {
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
}
M.config = function()
local util = require("gitsigns.util")
require("gitsigns").setup({
watch_gitdir = {
interval = 1000,
follow_files = true,
},
numhl = true,
linehl = false,
word_diff = false,
attach_to_untracked = true,
current_line_blame = true,
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'right_align',
delay = 500,
ignore_whitespace = false,
virt_text_priority = 100,
use_focus = true,
},
current_line_blame_formatter = function(name, info)
-- "|| <author> • <author_time:%R>"
return {
{
"|| ",
"@lsp.type.variable"
},
{
info.author,
"@lsp.type.comment"
},
{
" • ",
"@lsp.type.variable"
},
{
util.expand_format("<author_time:%R>", info),
"@lsp.type.operator"
},
}
end,
update_debounce = 200,
max_file_length = 40000,
preview_config = {
border = "rounded",
style = "minimal",
relative = "cursor",
row = 0,
col = 1,
},
})
end
return M