Open FahimAnayet opened 5 months ago
Same problem here. Initial homescreen/dashboard loads fine with my terminal as a ascii art header. Then I open a file, then if I try to open the dashboard again, the error above is given.
I'm using LazyVim and configuring it like so:
{
"goolord/alpha-nvim",
opts = function()
require("alpha")
require("alpha.term")
local dashboard = require("alpha.themes.dashboard")
dashboard.section.buttons.val = {
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
dashboard.button("w", " " .. " Find text", ":Telescope live_grep <CR>"),
dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("o", " " .. " Recent files", ":Telescope oldfiles <CR>"),
dashboard.button("m", " " .. " Bookmarks", ":Telescope marks <CR>"),
dashboard.button("c", " " .. " Config", ":e $MYVIMRC <CR>"),
dashboard.button("s", " " .. " Load last session", ":SessionManager load_last_session<CR>"),
dashboard.button("l", " " .. " Lazy", ":Lazy<CR>"),
dashboard.button("q", " " .. " Quit", ":qa<CR>"),
}
for _, button in ipairs(dashboard.section.buttons.val) do
button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut"
end
dashboard.section.footer.opts.hl = "Type"
dashboard.section.header.opts.hl = "AlphaShortcut"
dashboard.section.buttons.opts.hl = "AlphaButtons"
local width = 46
local height = 25 -- two pixels per vertical space
dashboard.section.terminal.command = "cat | " .. os.getenv("HOME") .. "/.config/nvim/art/this-is-fine.sh"
dashboard.section.terminal.width = width
dashboard.section.terminal.height = height
dashboard.section.terminal.opts.redraw = true
dashboard.section.header.val = "🔥 Welcome back! This is gonna be fine! 🔥"
dashboard.config.layout = {
{
type = "padding",
val = 1,
},
dashboard.section.terminal,
{
type = "padding",
val = 8,
},
dashboard.section.header,
{
type = "padding",
val = 2,
},
dashboard.section.buttons,
{
type = "padding",
val = 1,
},
dashboard.section.footer,
}
return dashboard
end,
},
I use terminal as header option in Alpha. It works fine. But when I leave alpha and on some point I want to go back to alpha the following error appears. This problem was bugging me for a long time. But I thought I did any mistakes. If the problem was on my config please correct me. My config is given below. And yes If I do not use terminal no problem appears at all. And thank you for this fast beautiful plugin, really appreciate your work.
This is on the startup. And expected behaviour every time.
This is when I call
Alpha
from any buffer. [NB. I try changing terminal command to justecho 'hi'
thinking that was the problem. But nope.] Actual behaviour.