Skip to content

Commit

Permalink
feat: user config
Browse files Browse the repository at this point in the history
  • Loading branch information
genzyy committed Feb 10, 2024
1 parent 751ad32 commit 2c5704a
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions lua/embark/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@ local none = 'NONE'

local M = {}

--- @class StyleProps
--- @field bold boolean
--- @field italic boolean
local style_props = {

Check warning on line 9 in lua/embark/init.lua

View workflow job for this annotation

GitHub Actions / Lint

unused variable style_props

Check warning on line 9 in lua/embark/init.lua

View workflow job for this annotation

GitHub Actions / Lint

unused variable style_props
bold = true,
italic = true,
}

--- @class EmbarkConf
--- @field style table
M.config = {
styles = {
--- @type StyleProps
keywords = { bold = true, italic = true },
--- @type StyleProps
comments = { bold = false, italic = true },
}
}

local colors = {
bg = '#1e1c31',
bg_dark = '#100e23',
Expand Down Expand Up @@ -49,7 +68,8 @@ M.colorscheme = function()
highlight(0, 'ModeMsg', { fg = colors.norm_subtle })

-- Comments
highlight(0, 'Comment', { fg = colors.norm_subtle })
highlight(0, 'Comment',
{ fg = colors.norm_subtle, bold = M.config.styles.comments.bold, italic = M.config.styles.comments.italic })

-- Functions
highlight(0, 'Function', { fg = colors.red })
Expand Down Expand Up @@ -294,7 +314,8 @@ M.colorscheme = function()
highlight(0, '@lsp.type.operator', { link = '@operator' })
highlight(0, '@lsp.type.parameter', { link = '@parameter' })
highlight(0, '@lsp.type.property', { link = '@property' })
highlight(0, '@lsp.type.selfKeyword', { link = '@variable.builtin' })
highlight(0, '@lsp.type.selfKeyword',
{ link = '@variable.builtin', bold = M.config.styles.keywords.bold, italic = M.config.styles.keywords.italic, })
highlight(0, '@lsp.type.selfParameter', { link = '@variable.builtin' })
highlight(0, '@lsp.type.string', { link = '@string' })
highlight(0, '@lsp.type.struct', { link = '@type' })
Expand Down

0 comments on commit 2c5704a

Please sign in to comment.