From b3036f336aa9253e825f2d5b8d3b9d05e78c98bc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 20 Jul 2023 23:46:10 +0200 Subject: [PATCH] refactor: rename button to pills --- README.md | 2 ++ lua/lazy/core/config.lua | 3 ++- lua/lazy/view/render.lua | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eb3faa1..31ddfb7 100644 --- a/README.md +++ b/README.md @@ -339,6 +339,8 @@ return { border = "none", title = nil, ---@type string only works when border is not "none" title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean icons = { cmd = " ", config = "", diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index e5e0298..9f51a78 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -50,7 +50,8 @@ M.defaults = { border = "none", title = nil, ---@type string only works when border is not "none" title_pos = "center", ---@type "center" | "left" | "right" - button = true, ---@type boolean + -- Show pills on top of the Lazy window + pills = true, ---@type boolean icons = { cmd = " ", config = "", diff --git a/lua/lazy/view/render.lua b/lua/lazy/view/render.lua index 51e65db..fe9f87e 100644 --- a/lua/lazy/view/render.lua +++ b/lua/lazy/view/render.lua @@ -117,7 +117,7 @@ function M:title() return c.button end, ViewConfig.get_commands()) - if Config.options.ui.button then + if Config.options.ui.pills then self:nl() for c, mode in ipairs(modes) do local title = " " .. mode.name:sub(1, 1):upper() .. mode.name:sub(2) .. " (" .. mode.key .. ") "