From 9a4a5f31ae40021cd2bf023fcf4e7b1a602d1ea6 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Thu, 1 Aug 2024 11:10:08 +0200 Subject: [PATCH] configure highlighting during plugin config --- lua/custom/plugins/conflictmarker.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/custom/plugins/conflictmarker.lua b/lua/custom/plugins/conflictmarker.lua index 4bc246d..896a921 100644 --- a/lua/custom/plugins/conflictmarker.lua +++ b/lua/custom/plugins/conflictmarker.lua @@ -5,17 +5,17 @@ vim.g.conflict_marker_highlight_group = '' vim.g.conflict_marker_begin = '^<<<<<<< .*$' vim.g.conflict_marker_end = '^>>>>>>> .*$' --- Highlight groups -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' - -- Git conflict marker management plugin return { 'rhysd/conflict-marker.vim', config = function() + -- Highlight groups + 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' + -- Read all lines in buffer, check if there is any conflict marker function git_conflict_detection() local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)