2021-03-13 02:23:02 +01:00
|
|
|
require("gitsigns").setup {
|
|
|
|
signs = {
|
|
|
|
add = {hl = "DiffAdd", text = "▌", numhl = "GitSignsAddNr"},
|
|
|
|
change = {hl = "DiffChange", text = "▌", numhl = "GitSignsChangeNr"},
|
|
|
|
delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"},
|
|
|
|
topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"},
|
|
|
|
changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"}
|
|
|
|
},
|
|
|
|
numhl = false,
|
|
|
|
keymaps = {
|
|
|
|
-- Default keymap options
|
|
|
|
noremap = true,
|
|
|
|
buffer = true,
|
|
|
|
["n ]c"] = {expr = true, '&diff ? \']c\' : \'<cmd>lua require"gitsigns".next_hunk()<CR>\''},
|
|
|
|
["n [c"] = {expr = true, '&diff ? \'[c\' : \'<cmd>lua require"gitsigns".prev_hunk()<CR>\''},
|
|
|
|
["n <leader>hs"] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
|
|
|
|
["n <leader>hu"] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
|
|
|
|
["n <leader>hr"] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
|
|
|
|
["n <leader>hp"] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
|
|
|
["n <leader>hb"] = '<cmd>lua require"gitsigns".blame_line()<CR>'
|
|
|
|
},
|
|
|
|
watch_index = {
|
|
|
|
interval = 100
|
|
|
|
},
|
|
|
|
sign_priority = 5,
|
|
|
|
status_formatter = nil -- Use default
|
2021-03-07 16:19:51 +01:00
|
|
|
}
|
2021-04-11 05:14:56 +02:00
|
|
|
|
|
|
|
local cmd = vim.cmd
|
|
|
|
|
|
|
|
cmd "hi DiffAdd guifg=#81A1C1 guibg = none"
|
|
|
|
cmd "hi DiffChange guifg =#3A3E44 guibg = none"
|
|
|
|
cmd "hi DiffModified guifg = #81A1C1 guibg = none"
|