diff options
| author | glepnir <glephunter@gmail.com> | 2025-03-19 05:05:35 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-18 16:05:35 -0500 |
| commit | 62d9fab9af21323e42828748e6761c02020a7aa5 (patch) | |
| tree | c92c1fc3e5fd4e25850b5b7f7e0b617c0b322421 /src/nvim/options.lua | |
| parent | eefd72fff753e923abf88ac85b1de0859cf24635 (diff) | |
| download | rneovim-62d9fab9af21323e42828748e6761c02020a7aa5.tar.gz rneovim-62d9fab9af21323e42828748e6761c02020a7aa5.tar.bz2 rneovim-62d9fab9af21323e42828748e6761c02020a7aa5.zip | |
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>
Diffstat (limited to 'src/nvim/options.lua')
| -rw-r--r-- | src/nvim/options.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua index d150303033..3cf60513c4 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -10189,6 +10189,26 @@ local options = { 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', defaults = { |