From 62d9fab9af21323e42828748e6761c02020a7aa5 Mon Sep 17 00:00:00 2001 From: glepnir Date: Wed, 19 Mar 2025 05:05:35 +0800 Subject: 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 --- runtime/lua/vim/_meta/api.lua | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'runtime/lua/vim/_meta/api.lua') diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index 2c1fb260b2..e7ad91132d 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -1797,17 +1797,11 @@ function vim.api.nvim_open_term(buffer, opts) end --- 'fillchars' to a space char, and clearing the --- `hl-EndOfBuffer` region in 'winhighlight'. --- - border: Style of (optional) window border. This can either be a string ---- or an array. The string values are ---- - "none": No border (default). ---- - "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. ---- - If it is an array, it should have a length of eight or any divisor of ---- eight. The array will specify the eight chars building up the border ---- in a clockwise fashion starting with the top-left corner. As an ---- example, the double box style could be specified as: +--- or an array. The string values are the same as those described in 'winborder'. +--- If it is an array, it should have a length of eight or any divisor of +--- eight. The array will specify the eight chars building up the border +--- in a clockwise fashion starting with the top-left corner. As an +--- example, the double box style could be specified as: --- ``` --- [ "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" ]. --- ``` -- cgit