From 8aab0f792535d5f172b6f3210f0c123d8ce05e39 Mon Sep 17 00:00:00 2001 From: ChristianChiarulli Date: Wed, 21 Sep 2022 23:39:18 -0400 Subject: fix(alpha): can't set button hl without doing this --- lua/lvim/core/alpha/dashboard.lua | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'lua/lvim/core') diff --git a/lua/lvim/core/alpha/dashboard.lua b/lua/lvim/core/alpha/dashboard.lua index e92f12bb..51338554 100644 --- a/lua/lvim/core/alpha/dashboard.lua +++ b/lua/lvim/core/alpha/dashboard.lua @@ -103,18 +103,22 @@ function M.get_sections() }, } + local dashboard = require "alpha.themes.dashboard" + + local function button(sc, txt, keybind, keybind_opts) + local b = dashboard.button(sc, txt, keybind, keybind_opts) + b.opts.hl_shortcut = "Macro" + return b + end + local buttons = { - entries = { - { "f", " Find File", "Telescope find_files" }, - { "n", " New File", "ene!" }, - { "p", " Projects ", "Telescope projects" }, - { "r", " Recent Files", "Telescope oldfiles" }, - { "t", " Find Text", "Telescope live_grep" }, - { - "c", - " Configuration", - "edit " .. require("lvim.config"):get_user_config_path() .. " ", - }, + val = { + button("f", " Find File", "Telescope find_files"), + button("n", " New File", "ene!"), + button("p", " Projects ", "Telescope projects"), + button("r", " Recent files", ":Telescope oldfiles "), + button("t", " Find Text", "Telescope live_grep"), + button("c", " Configuration", "edit " .. require("lvim.config"):get_user_config_path() .. " "), }, } -- cgit v1.2.3