Skip to content

Commit

Permalink
feat: use user config
Browse files Browse the repository at this point in the history
  • Loading branch information
genzyy committed Feb 17, 2024
1 parent 2c5704a commit 6a7770a
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions lua/embark/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ local style_props = {
}

--- @class EmbarkConf
--- @field style table
M.config = {
--- @field styles table
M.config = {
styles = {
--- @type StyleProps
keywords = { bold = true, italic = true },
Expand All @@ -22,6 +22,24 @@ local style_props = {
}
}

--- @param config EmbarkConf?
function M.setup(config)
if config ~= nil then
M.config = {
styles = {
keywords = {
italic = config.styles.keywords.italic or M.config.styles.keywords.italic,
bold = config.styles.keywords.bold or M.config.styles.keywords.bold,
},
comments = {
italic = config.styles.comments.italic or M.config.styles.comments.italic,
bold = config.styles.comments.bold or M.config.styles.comments.bold,
}
}
}
end
end

local colors = {
bg = '#1e1c31',
bg_dark = '#100e23',
Expand Down

0 comments on commit 6a7770a

Please sign in to comment.