summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristianChiarulli <[email protected]>2022-09-21 23:39:18 -0400
committerChristianChiarulli <[email protected]>2022-09-21 23:39:18 -0400
commit8aab0f792535d5f172b6f3210f0c123d8ce05e39 (patch)
treed3ceb84e55cb85b261347b3025ad04db4177eb30
parentbea690fc16e3e23e8644c61b1d2e140fb8851d1b (diff)
fix(alpha): can't set button hl without doing this
-rw-r--r--lua/lvim/core/alpha/dashboard.lua26
1 files changed, 15 insertions, 11 deletions
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", "<CMD>Telescope find_files<CR>" },
- { "n", " New File", "<CMD>ene!<CR>" },
- { "p", " Projects ", "<CMD>Telescope projects<CR>" },
- { "r", " Recent Files", "<CMD>Telescope oldfiles<CR>" },
- { "t", " Find Text", "<CMD>Telescope live_grep<CR>" },
- {
- "c",
- " Configuration",
- "<CMD>edit " .. require("lvim.config"):get_user_config_path() .. " <CR>",
- },
+ val = {
+ button("f", " Find File", "<CMD>Telescope find_files<CR>"),
+ button("n", " New File", "<CMD>ene!<CR>"),
+ button("p", " Projects ", "<CMD>Telescope projects<CR>"),
+ button("r", " Recent files", ":Telescope oldfiles <CR>"),
+ button("t", " Find Text", "<CMD>Telescope live_grep<CR>"),
+ button("c", " Configuration", "<CMD>edit " .. require("lvim.config"):get_user_config_path() .. " <CR>"),
},
}