Skip to content

Commit

Permalink
fix: Fixed merging of highlight groups
Browse files Browse the repository at this point in the history
Ref: #172
  • Loading branch information
OXY2DEV committed Oct 9, 2024
1 parent 493c054 commit c29cf91
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/markview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1375,9 +1375,13 @@ end
markview.setup = function (user_config)
if user_config and user_config.highlight_groups then
if vim.islist(user_config.highlight_groups) then
markview.configuration.highlight_groups = user_config.highlight_groups;
if vim.islist(markview.configuration.highlight_groups) then
markview.configuration.highlight_groups = vim.list_extend(markview.configuration.highlight_groups, user_config.highlight_groups);
else
markview.configuration.highlight_groups = vim.list_extend(hls[markview.configuration.highlight_groups], user_config.highlight_groups);
end
else
markview.configuration.highlight_groups = vim.list_extend(markview.configuration.highlight_groups, user_config.highlight_groups);
markview.configuration.highlight_groups = user_config.highlight_groups;
end
end

Expand Down

0 comments on commit c29cf91

Please sign in to comment.