From 1c8768f22e76948bcfbe08afae8166fc1ee7dec0 Mon Sep 17 00:00:00 2001 From: abeldekat Date: Thu, 19 Oct 2023 21:31:20 +0200 Subject: [PATCH] style(dashboard): remove unnecessary brackets from keys, including the p key from the project extras --- lua/lazyvim/plugins/ui.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 88577395..d8c34575 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -389,11 +389,6 @@ return { }, } - for _, button in ipairs(opts.config.center) do - button.desc = button.desc .. string.rep(" ", 43 - #button.desc) - button.key_format = " %s" - end - -- close Lazy and re-open when the dashboard is ready if vim.o.filetype == "lazy" then vim.cmd.close() @@ -407,5 +402,12 @@ return { return opts end, + config = function(_, opts) + for _, button in ipairs(opts.config.center) do + button.desc = button.desc .. string.rep(" ", 43 - #button.desc) + button.key_format = " %s" + end + require("dashboard").setup(opts) + end, }, }