refactor: rename button to pills

This commit is contained in:
Folke Lemaitre 2023-07-20 23:46:10 +02:00
commit b3036f336a
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 5 additions and 2 deletions

View file

@ -339,6 +339,8 @@ return {
border = "none", border = "none",
title = nil, ---@type string only works when border is not "none" title = nil, ---@type string only works when border is not "none"
title_pos = "center", ---@type "center" | "left" | "right" title_pos = "center", ---@type "center" | "left" | "right"
-- Show pills on top of the Lazy window
pills = true, ---@type boolean
icons = { icons = {
cmd = " ", cmd = " ",
config = "", config = "",

View file

@ -50,7 +50,8 @@ M.defaults = {
border = "none", border = "none",
title = nil, ---@type string only works when border is not "none" title = nil, ---@type string only works when border is not "none"
title_pos = "center", ---@type "center" | "left" | "right" title_pos = "center", ---@type "center" | "left" | "right"
button = true, ---@type boolean -- Show pills on top of the Lazy window
pills = true, ---@type boolean
icons = { icons = {
cmd = "", cmd = "",
config = "", config = "",

View file

@ -117,7 +117,7 @@ function M:title()
return c.button return c.button
end, ViewConfig.get_commands()) end, ViewConfig.get_commands())
if Config.options.ui.button then if Config.options.ui.pills then
self:nl() self:nl()
for c, mode in ipairs(modes) do for c, mode in ipairs(modes) do
local title = " " .. mode.name:sub(1, 1):upper() .. mode.name:sub(2) .. " (" .. mode.key .. ") " local title = " " .. mode.name:sub(1, 1):upper() .. mode.name:sub(2) .. " (" .. mode.key .. ") "