Skip to content

cfbender/claret.nvim

Repository files navigation

claret.nvim

Warm Neovim colorscheme with burgundy, gold, and sage — inspired by French cuisine. 🍷

claret.nvim

Variants

claret — dark

claret dark screenshot

claret-light — light

claret light screenshot

Install

{
  'cfbender/claret.nvim',
  priority = 1000,
  config = function()
    require('claret').setup({
      variant = 'auto',
      transparent = false,
    })
    vim.cmd.colorscheme('claret')
  end,
}

Configuration

require('claret').setup({
  variant = 'auto',       -- 'auto' | 'dark' | 'light'
  transparent = false,
  italics = {
    comments = true,
    keywords = true,
    parameters = true,
    decorators = true,
  },
  groups = {},            -- raw group overrides, merged last
  overrides = function(colors)
    -- return a table of palette overrides, e.g. { rose_1 = '#FF00FF' }
    return {}
  end,
})

Supported integrations

Completion & UI

Statusline & structure

Git & diffs

Notes, tasks, terminal

Diagnostics, test & debug

AI

Ports

Matching themes for other tools live under ports/. They are auto-generated from lua/claret/palette.lua — don't edit them directly.

Tool File Install
bat ports/bat/ClaretDark.tmTheme Copy into "$(bat --config-dir)/themes/", then bat cache --build. Use with --theme=ClaretDark or set --theme="ClaretDark" in bat.conf.
ghostty ports/ghostty/claret-dark.conf Copy to ~/.config/ghostty/themes/claret-dark, then add theme = claret-dark to ~/.config/ghostty/config.
kitty ports/kitty/claret.conf include or copy into ~/.config/kitty/kitty.conf.
opencode ports/opencode/claret.json Copy to ~/.config/opencode/themes/claret.json, then set "theme": "claret" in opencode.json.
starship ports/starship/claret.toml Merge [palettes.claret] into ~/.config/starship.toml and set palette = "claret".
vicinae ports/vicinae/claret-dark.toml Copy to ~/.local/share/vicinae/themes/claret-dark.toml.
yazi ports/yazi/claret-dark.yazi/ Copy claret-dark.yazi/ to ~/.config/yazi/flavors/, then set dark = "claret-dark" under [flavor] in ~/.config/yazi/theme.toml.
zellij ports/zellij/claret-dark.kdl Copy to ~/.config/zellij/themes/claret-dark.kdl, then set theme "claret-dark" in your zellij config.

On macOS, replace ~/.config with $XDG_CONFIG_HOME if you set it, or use the tool's documented config directory.

Development

# Run the full test suite (palette, load, highlights, plugins, ports).
./scripts/test.sh

# Regenerate port files after changing the palette or generator.
nvim --headless -u tests/minimal_init.lua \
  -c "lua dofile('scripts/generate_ports.lua')" -c "qa!"

Git hooks (optional but recommended) — managed by lefthook via mise:

mise run hooks-install

The pre-commit hook regenerates port files automatically when lua/claret/palette.lua, scripts/generate_ports.lua, or anything under ports/ changes, then re-stages them.

Project layout

  • lua/claret/palette.lua — locked palette values (dark + light)
  • lua/claret/config.lua — defaults and user-config merge
  • lua/claret/theme.lua — assembles every highlight group
  • lua/claret/groups/*.lua — core groups (editor, syntax, diagnostics, …)
  • lua/claret/groups/plugins/*.lua — per-plugin integrations
  • colors/*.lua — colorscheme entrypoints
  • tests/*.lua — headless smoke checks
  • scripts/generate_ports.lua — generator for every file in ports/

Adding a plugin integration

  1. Add a new file under lua/claret/groups/plugins/ that returns { get = function(colors, opts) ... end }.
  2. Register it in lua/claret/theme.lua.
  3. Reuse semantic palette roles (rose_* for keywords, gold_* for functions, sage_* for strings, slate_* for types/tags, terra_* for errors) — don't invent new hues.
  4. Add an assertion to tests/plugins_spec.lua covering one representative group.

Changing the palette

  1. Edit lua/claret/palette.lua.
  2. Regenerate ports (or let the pre-commit hook do it).
  3. Run ./scripts/test.sh and update any hardcoded expectations in tests/.

About

wine and dine right in the editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages