Repository navigation
feat: add theme.transparent option for transparent window background - #132
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a new
theme.transparentconfig flag (defaultfalse) that makes the main window and help window render with a transparent background.Changes
lua/buffon/config.lua: Addtransparent = falseto the default theme. When enabled, creates a newBuffonWindowhighlight group withbg = NONE, default = true.lua/buffon/ui/window.lua: Accepttransparentflag inWindow:new. Whentrue, applieswinhighlightmappingNormal,FloatBorder,FloatTitle,FloatFooter, andEndOfBuffertoBuffonWindowafter the window is opened.lua/buffon/ui/mainwindow.lua/help.lua: Propagateconfig.theme.transparenttoWindow:new.tests/config_spec.lua: Updated default config test + 4 new tests covering the transparent flag.tests/window_spec.lua(new): 3 tests verifyingwinhighlightis applied only whentransparent = true.README.md: NewTransparent backgroundsection underTheming.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
falsekeeps the existing behavior for current users.Verification
make lint: 0 warnings, 0 errorsmake test: 49 tests passing (9 new)