feat(window): add configurable winblend for floats#73
Conversation
WalkthroughA new optional configuration field, Changes
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This is an automated commit.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
190-190: Enhancewinblendtype annotation.The new
---@field winblend? integer The winblend of the windowentry aligns the docs with the implementation. Consider expanding the description to specify the valid range (e.g.,0–100) or reference Neovim’s doc onwinblendfor clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
README.md(2 hunks)doc/time-machine.nvim.txt(2 hunks)lua/time-machine/config.lua(1 hunks)lua/time-machine/types.lua(1 hunks)lua/time-machine/window.lua(1 hunks)
🔇 Additional comments (6)
lua/time-machine/types.lua (1)
36-36: Well-defined type addition for window transparency.The new optional
winblendfield is properly typed as an integer with a clear description, maintaining consistency with other field definitions in this type.lua/time-machine/config.lua (1)
18-18: Good default value choice for winblend.Setting the default value to 0 (completely opaque) is appropriate as it maintains backward compatibility with existing behavior while allowing users to opt into transparency if desired.
lua/time-machine/window.lua (1)
48-52: Implementation correctly applies the winblend configuration.The code properly sets the window-local winblend option using the configured value or falls back to 0 if not specified. The placement after window creation is appropriate.
doc/time-machine.nvim.txt (2)
116-116: Documentation updated with the new winblend option.The default options section correctly shows the new winblend configuration with its default value of 0.
195-195: Type definition documentation is consistent.The type definition documentation properly includes the winblend field with matching type and description as in the code.
README.md (1)
112-112: Confirm defaultwinblendvalue infloat_opts.The default config snippet correctly adds
winblend = 0underfloat_opts, matching the code changes. Please verify that a default of0is intended (fully opaque) and that users know how to adjust this for transparency.
Summary by CodeRabbit
winblendoption.winblendtransparency setting and its usage in configuration examples and type definitions.