Skip to content

Commit

Permalink
fix(concealer): avoid conflict between preset and custom icons
Browse files Browse the repository at this point in the history
  • Loading branch information
champignoom authored and vhyrro committed Sep 18, 2023
1 parent 4b057ad commit 9a0aab0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lua/neorg/modules/core/concealer/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1391,20 +1391,18 @@ module.on_event = function(event)
end

module.load = function()
if
not module.imported[module.name .. ".preset_" .. module.config.public.icon_preset].config.private["icon_preset_" .. module.config.public.icon_preset]
then
local icon_preset = module.imported[module.name .. ".preset_" .. module.config.public.icon_preset].config.private["icon_preset_" .. module.config.public.icon_preset]
if not icon_preset then
log.error(
("Unable to load icon preset '%s' - such a preset does not exist"):format(module.config.public.icon_preset)
)
return
end

module.config.public.icons = vim.tbl_deep_extend(
module.config.public = vim.tbl_deep_extend(
"force",
module.config.public.icons,
module.imported[module.name .. ".preset_" .. module.config.public.icon_preset].config.private["icon_preset_" .. module.config.public.icon_preset]
or {},
module.config.public,
{ icons = icon_preset },
module.config.custom
)

Expand Down

0 comments on commit 9a0aab0

Please sign in to comment.