Skip to content

Commit

Permalink
fix preset icons
Browse files Browse the repository at this point in the history
  • Loading branch information
champignoom committed May 19, 2023
1 parent 4127bf2 commit 881996f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 54 deletions.
12 changes: 12 additions & 0 deletions lua/neorg/modules/core/concealer/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,18 @@ module.on_event = function(event)
end

module.load = function()
if not module.config.private["icon_preset_" .. module.config.public.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(
"force",
module.config.public.icons,
module.config.private["icon_preset_" .. module.config.public.icon_preset] or {},
module.config.custom
)

module.required["core.autocommands"].enable_autocommand("BufRead")
module.required["core.autocommands"].enable_autocommand("InsertEnter")
module.required["core.autocommands"].enable_autocommand("InsertLeave")
Expand Down
30 changes: 1 addition & 29 deletions lua/neorg/modules/core/concealer/preset_diamond.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,7 @@ local module = neorg.modules.extend("core.concealer.preset_diamond", "core.conce

module.config.private.icon_preset_diamond = {
heading = {
enabled = true,

level_1 = {
icon = "",
},

level_2 = {
icon = "",
},

level_3 = {
icon = "",
},

level_4 = {
icon = "",
},

level_5 = {
icon = "",
},

level_6 = {
icon = "",
},
},

marker = {
icon = "",
icons = { "", "", "", "", "", "" },
},

footnote = {
Expand Down
26 changes: 1 addition & 25 deletions lua/neorg/modules/core/concealer/preset_varied.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,7 @@ local module = neorg.modules.extend("core.concealer.preset_varied", "core.concea

module.config.private.icon_preset_varied = {
heading = {
enabled = true,

level_1 = {
icon = "",
},

level_2 = {
icon = "",
},

level_3 = {
icon = "",
},

level_4 = {
icon = "",
},

level_5 = {
icon = "",
},

level_6 = {
icon = "",
},
icons = { "", "", "", "", "", "" },
},

footnote = {
Expand Down

0 comments on commit 881996f

Please sign in to comment.