Skip to content

Commit

Permalink
feat: options to override colors, themes, #8
Browse files Browse the repository at this point in the history
  • Loading branch information
2nthony committed Nov 21, 2023
1 parent 46bbeda commit 8fec3fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ require("vitesse").setup {
telescope_border_follow_float_background = false,
-- diagnostic virtual text background, like error lens
diagnostic_virtual_text_background = false,

-- override the [./lua/vitesse/palette.lua], go to file see fields
colors = {},
themes = {},
}
```

Expand Down
4 changes: 4 additions & 0 deletions lua/vitesse/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ local defaults = {
cmp_cmdline_disable_search_highlight_group = false,
telescope_border_follow_float_background = false,
diagnostic_virtual_text_background = false,
colors = {}, -- override `vitesse_colors`
themes = {}, -- override `vitesse_themes`
}

local M = {
Expand All @@ -28,6 +30,8 @@ local M = {
function M.setup(user_opts)
user_opts = user_opts or {}
opts = vim.tbl_extend("force", defaults, user_opts)
vitesse_colors = vim.tbl_extend("force", vitesse_colors, opts.colors)
vitesse_themes = vim.tbl_extend("force", vitesse_themes, opts.themes)
end

function M.load()
Expand Down

0 comments on commit 8fec3fb

Please sign in to comment.