mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
feat(float): add winborder option (#31074)
Problem: There is currently no global option to define the default border style for floating windows. This leads to repetitive code when developers need consistent styling across multiple floating windows. Solution: Introduce a global option winborder to specify the default border style for floating windows. When a floating window is created without explicitly specifying a border style, the value of the winborder option will be used. This simplifies configuration and ensures consistency in floating window appearance. Co-authored-by: Gregory Anders <greg@gpanders.com>
This commit is contained in:
@@ -10188,6 +10188,26 @@ local options = {
|
||||
short_desc = N_('Controls transparency level for floating windows'),
|
||||
type = 'number',
|
||||
},
|
||||
{
|
||||
defaults = { if_true = '' },
|
||||
cb = 'did_set_winborder',
|
||||
values = { '', 'double', 'single', 'shadow', 'rounded', 'solid', 'none' },
|
||||
desc = [=[
|
||||
Defines the default border style of floating windows. The default value
|
||||
is empty, which is equivalent to "none". Valid values include:
|
||||
- "none": No border.
|
||||
- "single": A single line box.
|
||||
- "double": A double line box.
|
||||
- "rounded": Like "single", but with rounded corners ("╭" etc.).
|
||||
- "solid": Adds padding by a single whitespace cell.
|
||||
- "shadow": A drop shadow effect by blending with the background.
|
||||
]=],
|
||||
full_name = 'winborder',
|
||||
scope = { 'global' },
|
||||
short_desc = N_('border of floating window'),
|
||||
type = 'string',
|
||||
varname = 'p_winbd',
|
||||
},
|
||||
{
|
||||
abbreviation = 'wi',
|
||||
cb = 'did_set_window',
|
||||
|
Reference in New Issue
Block a user