Repository navigation
fix: always style floating window borders - #154
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
roosta
approved these changes
Oct 18, 2026
MindTooth
marked this pull request as ready for review
October 27, 2026 08:58
MindTooth
force-pushed
the
fix/float-border
branch
from
October 27, 2026 08:59
5063dbd to
a574048
Compare
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
Always define
FloatBorderwith Srcery colors, independently of the optionalg:srcery_normal_floatbackground setting.This keeps floating-window borders visually consistent with Srcery while preserving the existing opt-in behavior for changing
NormalFloatitself.Problem
Srcery currently defines both
NormalFloatandFloatBorderonly when:That couples two separate concerns:
NormalFloatcontrols the floating window background.FloatBordercontrols the border drawn around Neovim floating windows.With the option left at its default value (
0), Srcery does not defineFloatBorder. Neovim therefore falls back to its runtime/default highlight linkage for the border. This can make floating documentation windows use a much brighter border than the surrounding Srcery UI.The issue is particularly visible with vim-lsp on Neovim. Its hover/completion documentation uses
nvim_open_win()with a border and remaps the float contents toPmenu:The contents therefore follow Srcery's
Pmenustyling, while the border still usesFloatBorder. If Srcery leavesFloatBorderundefined, the dialog ends up with a Srcery-colored body but a runtime-defined border that does not match it.Neovim documents
FloatBorderas the highlight used for floating-window borders by default.Change
Move the existing Srcery
FloatBorderdefinition outside theg:srcery_normal_floatconditional:The colors themselves are unchanged:
gray3(#312f2c)NONEgray1(#1c1b19)The README is adjusted accordingly:
g:srcery_normal_floatnow accurately describes only the optional floating-window background behavior.Why keep
NormalFloatoptional?Srcery intentionally made
NormalFloatopt-in because different plugins make different assumptions about floating-window backgrounds. This PR preserves that behavior.The border does not have the same compatibility concern. A floating window that asks Neovim to draw a border already expects a border highlight, and defining
FloatBorderensures it follows the active colorscheme instead of inheriting a potentially incompatible runtime default.This also keeps the change narrowly scoped: it does not alter
Pmenu,PmenuSel, vim-lsp, vim-airline, or any plugin-specific highlight groups.Verification
Verified against:
masternvim_open_win(), maps the contents toPmenu, and leaves the border toFloatBorderFloatBorderas the default floating-window border highlightNormalFloat, including the intentional opt-in added to avoid imposing a float background on every pluginThe branch contains only the colorscheme change and the matching documentation correction.