Skip to content

feat: add theme.transparent option for transparent window background - #132

Merged
francescarpi merged 1 commit into
developfrom
feat/bg_transparent
Jun 26, 2026
Merged

francescarpi merged 1 commit into
developfrom
feat/bg_transparent

Conversation

@francescarpi

Copy link
Copy Markdown
Owner

Summary

Add a new theme.transparent config flag (default false) that makes the main window and help window render with a transparent background.

Changes

  • lua/buffon/config.lua: Add transparent = false to the default theme. When enabled, creates a new BuffonWindow highlight group with bg = NONE, default = true.
  • lua/buffon/ui/window.lua: Accept transparent flag in Window:new. When true, applies winhighlight mapping Normal, FloatBorder, FloatTitle, FloatFooter, and EndOfBuffer to BuffonWindow after the window is opened.
  • lua/buffon/ui/mainwindow.lua / help.lua: Propagate config.theme.transparent to Window:new.
  • tests/config_spec.lua: Updated default config test + 4 new tests covering the transparent flag.
  • tests/window_spec.lua (new): 3 tests verifying winhighlight is applied only when transparent = true.
  • README.md: New Transparent background section under Theming.

Usage

{
  opts = {
    theme = {
      transparent = true,
    },
  },
}

When enabled, the foreground colors of Buffon's existing highlight groups (shortcut, active, etc.) remain unchanged — only the background becomes transparent. The default false keeps the existing behavior for current users.

Verification

  • make lint: 0 warnings, 0 errors
  • make test: 49 tests passing (9 new)

Add a new theme.transparent config flag (default false) that makes the
main window and help window render with a transparent background by
mapping Normal, FloatBorder, FloatTitle, FloatFooter, and EndOfBuffer
to a new BuffonWindow highlight group with bg = NONE.
@francescarpi francescarpi self-assigned this Jun 26, 2026
@francescarpi francescarpi added the enhancement New feature or request label Jun 26, 2026
@francescarpi
francescarpi merged commit bdf9328 into develop Jun 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant