diff --git a/after/plugin/defaults.lua b/after/plugin/defaults.lua index 2e4bc0e4..a488b69a 100644 --- a/after/plugin/defaults.lua +++ b/after/plugin/defaults.lua @@ -106,3 +106,9 @@ for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type vim.fn.sign_define(hl, {text = icon, texthl = hl, numhl = hl}) end + +vim.cmd [[highlight ConflictMarkerBegin guibg=#2f7366]] +vim.cmd [[highlight ConflictMarkerOurs guibg=#2e5049]] +vim.cmd [[highlight ConflictMarkerTheirs guibg=#344f69]] +vim.cmd [[highlight ConflictMarkerEnd guibg=#2f628e]] +vim.cmd [[highlight ConflictMarkerCommonAncestorsHunk guibg=#754a81]] diff --git a/lua/custom/plugins/git-conflict.lua b/lua/custom/plugins/git-conflict.lua new file mode 100644 index 00000000..5a47ca4e --- /dev/null +++ b/lua/custom/plugins/git-conflict.lua @@ -0,0 +1,5 @@ +return { + "rhysd/conflict-marker.vim", + config = function() + end +} diff --git a/lua/custom/plugins/gitsigns.lua b/lua/custom/plugins/gitsigns.lua new file mode 100644 index 00000000..91985a23 --- /dev/null +++ b/lua/custom/plugins/gitsigns.lua @@ -0,0 +1,61 @@ +return { + 'lewis6991/gitsigns.nvim', + 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' + } + }, + numhl = true, + linehl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + + ['n hn'] = { + expr = true, + "&diff ? 'hn' : 'lua require\"gitsigns\".next_hunk()'" + }, + ['n hN'] = { + expr = true, + "&diff ? 'hN' : 'lua require\"gitsigns\".prev_hunk()'" + }, + + ['n hs'] = 'lua require"gitsigns".stage_hunk()', + ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', + ['n hr'] = 'lua require"gitsigns".reset_hunk()', + ['n hR'] = 'lua require"gitsigns".reset_buffer()', + ['n hp'] = 'lua require"gitsigns".preview_hunk()', + ['n hb'] = 'lua require"gitsigns".blame_line()' + }, + watch_gitdir = {interval = 1000}, + current_line_blame = true, + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + diff_opts = {internal = true} + } +}