BREAKING CHANGE | re-implementation of custom config

This commit is contained in:
siduck 2022-04-27 21:12:28 +05:30
parent d906bb0d9c
commit adecbe719f
20 changed files with 835 additions and 1309 deletions

View file

@ -32,9 +32,9 @@ local function button(sc, txt, keybind)
}
end
local default = {}
local options = {}
default.ascii = {
local ascii = {
" ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ",
" ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ",
" ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ",
@ -48,16 +48,16 @@ default.ascii = {
" ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ",
}
default.header = {
options.header = {
type = "text",
val = default.ascii,
val = ascii,
opts = {
position = "center",
hl = "AlphaHeader",
},
}
default.buttons = {
options.buttons = {
type = "group",
val = {
button("SPC f f", " Find File ", ":Telescope find_files<CR>"),
@ -72,21 +72,14 @@ default.buttons = {
},
}
local M = {}
options = require("core.utils").load_override(options, "goolord/alpha-nvim")
M.setup = function(override_flag)
if override_flag then
default = require("core.utils").tbl_override_req("alpha", default)
end
alpha.setup {
layout = {
{ type = "padding", val = 9 },
default.header,
{ type = "padding", val = 2 },
default.buttons,
},
opts = {},
}
end
return M
alpha.setup {
layout = {
{ type = "padding", val = 9 },
options.header,
{ type = "padding", val = 2 },
options.buttons,
},
opts = {},
}