From c1737d866ebddb8270e3bdce9ec6f425ff24fb48 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 22 Oct 2025 23:06:33 +0200 Subject: [PATCH] feat(win): all existing snacks windows for all plugins now honor `vim.o.winborder`. Defaults to `rounded` if not set. --- lua/snacks/git.lua | 2 +- lua/snacks/image/init.lua | 2 +- lua/snacks/input.lua | 2 +- lua/snacks/notifier.lua | 4 ++-- lua/snacks/picker/config/layouts.lua | 24 ++++++++++++------------ lua/snacks/scratch.lua | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lua/snacks/git.lua b/lua/snacks/git.lua index d7c9368a..b45083a8 100644 --- a/lua/snacks/git.lua +++ b/lua/snacks/git.lua @@ -8,7 +8,7 @@ M.meta = { Snacks.config.style("blame_line", { width = 0.6, height = 0.6, - border = "rounded", + border = true, title = " Git Blame ", title_pos = "center", ft = "git", diff --git a/lua/snacks/image/init.lua b/lua/snacks/image/init.lua index c8083d33..ef20d4a8 100644 --- a/lua/snacks/image/init.lua +++ b/lua/snacks/image/init.lua @@ -169,7 +169,7 @@ M.config = Snacks.config.get("image", defaults) Snacks.config.style("snacks_image", { relative = "cursor", - border = "rounded", + border = true, focusable = false, backdrop = false, row = 1, diff --git a/lua/snacks/input.lua b/lua/snacks/input.lua index 5550ed1f..fccdd430 100644 --- a/lua/snacks/input.lua +++ b/lua/snacks/input.lua @@ -39,7 +39,7 @@ Snacks.util.set_hl({ Snacks.config.style("input", { backdrop = false, position = "float", - border = "rounded", + border = true, title_pos = "center", height = 1, width = 60, diff --git a/lua/snacks/notifier.lua b/lua/snacks/notifier.lua index af9f7e94..80e06af2 100644 --- a/lua/snacks/notifier.lua +++ b/lua/snacks/notifier.lua @@ -79,7 +79,7 @@ local history_opts = { } Snacks.config.style("notification", { - border = "rounded", + border = true, zindex = 100, ft = "markdown", wo = { @@ -92,7 +92,7 @@ Snacks.config.style("notification", { }) Snacks.config.style("notification_history", { - border = "rounded", + border = true, zindex = 100, width = 0.6, height = 0.6, diff --git a/lua/snacks/picker/config/layouts.lua b/lua/snacks/picker/config/layouts.lua index 3d1e484b..49b0377c 100644 --- a/lua/snacks/picker/config/layouts.lua +++ b/lua/snacks/picker/config/layouts.lua @@ -10,12 +10,12 @@ M.default = { height = 0.8, { box = "vertical", - border = "rounded", + border = true, title = "{title} {live} {flags}", { win = "input", height = 1, border = "bottom" }, { win = "list", border = "none" }, }, - { win = "preview", title = "{preview}", border = "rounded", width = 0.5 }, + { win = "preview", title = "{preview}", border = true, width = 0.5 }, }, } @@ -32,7 +32,7 @@ M.sidebar = { { win = "input", height = 1, - border = "rounded", + border = true, title = "{title} {live} {flags}", title_pos = "center", }, @@ -51,14 +51,14 @@ M.telescope = { border = "none", { box = "vertical", - { win = "list", title = " Results ", title_pos = "center", border = "rounded" }, - { win = "input", height = 1, border = "rounded", title = "{title} {live} {flags}", title_pos = "center" }, + { win = "list", title = " Results ", title_pos = "center", border = true }, + { win = "input", height = 1, border = true, title = "{title} {live} {flags}", title_pos = "center" }, }, { win = "preview", title = "{preview:Preview}", width = 0.45, - border = "rounded", + border = true, title_pos = "center", }, }, @@ -112,10 +112,10 @@ M.dropdown = { height = 0.8, border = "none", box = "vertical", - { win = "preview", title = "{preview}", height = 0.4, border = "rounded" }, + { win = "preview", title = "{preview}", height = 0.4, border = true }, { box = "vertical", - border = "rounded", + border = true, title = "{title} {live} {flags}", title_pos = "center", { win = "input", height = 1, border = "bottom" }, @@ -132,7 +132,7 @@ M.vertical = { height = 0.8, min_height = 30, box = "vertical", - border = "rounded", + border = true, title = "{title} {live} {flags}", title_pos = "center", { win = "input", height = 1, border = "bottom" }, @@ -150,7 +150,7 @@ M.select = { height = 0.4, min_height = 3, box = "vertical", - border = "rounded", + border = true, title = "{title}", title_pos = "center", { win = "input", height = 1, border = "bottom" }, @@ -169,9 +169,9 @@ M.vscode = { height = 0.4, border = "none", box = "vertical", - { win = "input", height = 1, border = "rounded", title = "{title} {live} {flags}", title_pos = "center" }, + { win = "input", height = 1, border = true, title = "{title} {live} {flags}", title_pos = "center" }, { win = "list", border = "hpad" }, - { win = "preview", title = "{preview}", border = "rounded" }, + { win = "preview", title = "{preview}", border = true }, }, } diff --git a/lua/snacks/scratch.lua b/lua/snacks/scratch.lua index bc7f5c52..0ca22aad 100644 --- a/lua/snacks/scratch.lua +++ b/lua/snacks/scratch.lua @@ -83,7 +83,7 @@ Snacks.config.style("scratch", { zindex = 20, wo = { winhighlight = "NormalFloat:Normal" }, footer_keys = true, - border = "rounded", + border = true, }) --- Return a list of scratch buffers sorted by mtime.