aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/options.lua
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2025-03-19 05:05:35 +0800
committerGitHub <noreply@github.com>2025-03-18 16:05:35 -0500
commit62d9fab9af21323e42828748e6761c02020a7aa5 (patch)
treec92c1fc3e5fd4e25850b5b7f7e0b617c0b322421 /runtime/lua/vim/_meta/options.lua
parenteefd72fff753e923abf88ac85b1de0859cf24635 (diff)
downloadrneovim-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 'runtime/lua/vim/_meta/options.lua')
-rw-r--r--runtime/lua/vim/_meta/options.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 5e138c1a4a..46366d585b 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -7832,6 +7832,19 @@ vim.o.winbl = vim.o.winblend
vim.wo.winblend = vim.o.winblend
vim.wo.winbl = vim.wo.winblend
+--- 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.
+---
+--- @type ''|'double'|'single'|'shadow'|'rounded'|'solid'|'none'
+vim.o.winborder = ""
+vim.go.winborder = vim.o.winborder
+
--- Window height used for `CTRL-F` and `CTRL-B` when there is only one
--- window and the value is smaller than 'lines' minus one. The screen
--- will scroll 'window' minus two lines, with a minimum of one.