Skip to content

feat: add custom_highlights option#4

Merged
danfry1 merged 1 commit into
mainfrom
feat/custom-highlights
Mar 23, 2026
Merged

feat: add custom_highlights option#4
danfry1 merged 1 commit into
mainfrom
feat/custom-highlights

Conversation

@danfry1
Copy link
Copy Markdown
Owner

@danfry1 danfry1 commented Mar 23, 2026

Summary

Adds a custom_highlights option to setup() so users can override or extend any highlight group.

Accepts either a table or a function:

require("lume").setup({
  -- As a function (recommended) — gives access to palette colors
  custom_highlights = function(colors, variant)
    return {
      Normal = { bg = "#1E1F2E" },
      MiniDiffSignAdd = { fg = colors.accents.sage },
    }
  end,
})

The variant parameter is "dark" for now, future-proofed for when a light theme is added.

Overrides are applied after all built-in groups, so they always win.

Thanks to @iAmKevinCruz for the suggestion!

Closes #3

Accepts a table or a function(colors, variant) that returns a table.
Overrides are applied after all built-in groups, so users can tweak
any highlight. The variant parameter ("dark"/"light") future-proofs
for a potential light theme.

Closes #3
@danfry1 danfry1 merged commit 1c16d97 into main Mar 23, 2026
3 checks passed
@danfry1 danfry1 deleted the feat/custom-highlights branch March 23, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Custom Highlights to the config

1 participant