2021-07-13 01:30:07 +02:00
|
|
|
local M = {}
|
2021-08-22 20:03:19 +02:00
|
|
|
|
2021-07-13 01:30:07 +02:00
|
|
|
M.config = function()
|
2021-07-25 03:17:11 +02:00
|
|
|
lvim.builtin.gitsigns = {
|
2021-08-17 17:20:18 +02:00
|
|
|
active = true,
|
2021-08-22 20:03:19 +02:00
|
|
|
on_config_done = nil,
|
2021-08-17 17:20:18 +02:00
|
|
|
opts = {
|
|
|
|
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",
|
|
|
|
},
|
2021-07-13 01:30:07 +02:00
|
|
|
},
|
2021-08-17 17:20:18 +02:00
|
|
|
numhl = false,
|
|
|
|
linehl = false,
|
|
|
|
keymaps = {
|
|
|
|
-- Default keymap options
|
|
|
|
noremap = true,
|
|
|
|
buffer = true,
|
2021-07-13 01:30:07 +02:00
|
|
|
},
|
2021-09-25 09:05:08 +02:00
|
|
|
watch_gitdir = { interval = 1000 },
|
2021-08-17 17:20:18 +02:00
|
|
|
sign_priority = 6,
|
|
|
|
update_debounce = 200,
|
|
|
|
status_formatter = nil, -- Use default
|
2021-07-13 01:30:07 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
M.setup = function()
|
2021-08-22 20:03:19 +02:00
|
|
|
local gitsigns = require "gitsigns"
|
|
|
|
|
|
|
|
gitsigns.setup(lvim.builtin.gitsigns.opts)
|
|
|
|
if lvim.builtin.gitsigns.on_config_done then
|
|
|
|
lvim.builtin.gitsigns.on_config_done(gitsigns)
|
|
|
|
end
|
2021-07-13 01:30:07 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
return M
|