goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.84k stars 109 forks source link

fotune text got clipped in dashboard theme. #41

Closed jdhao closed 2 years ago

jdhao commented 2 years ago

This is my config for dashboard theme:

local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")

-- Set header
dashboard.section.header.val = {
    "                                                     ",
    "  ███╗   ██╗███████╗ ██████╗ ██╗   ██╗██╗███╗   ███╗ ",
    "  ████╗  ██║██╔════╝██╔═══██╗██║   ██║██║████╗ ████║ ",
    "  ██╔██╗ ██║█████╗  ██║   ██║██║   ██║██║██╔████╔██║ ",
    "  ██║╚██╗██║██╔══╝  ██║   ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
    "  ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
    "  ╚═╝  ╚═══╝╚══════╝ ╚═════╝   ╚═══╝  ╚═╝╚═╝     ╚═╝ ",
    "                                                     ",
}

-- Set menu
dashboard.section.buttons.val = {
    dashboard.button( "Leader f f", "  > Find file", ":Leaderf file --popup<CR>"),
    dashboard.button( "Leader f r", "  > Recent files"   , ":Leaderf mru --popup<CR>"),
    dashboard.button( "Leader f g", "  > Project grep" , ":Leaderf rg --popup<CR>"),
    dashboard.button( "e", "  > New file" , ":enew <CR>"),
    dashboard.button( "q", "  > Quit NVIM", ":qa<CR>"),
}

local fortune = require("alpha.fortune")
dashboard.section.footer.val = fortune()

alpha.setup(dashboard.opts)

-- Send config to alpha
alpha.setup(dashboard.opts)

I observed that some fortune text get clipped and become incomplete, for example: alpha-fortune

jdhao commented 2 years ago

Another case of text cutoff:

image

rollingmoai commented 2 years ago

Same thing happens when you put it in the header. Affects both dashboard and startify theme.

goolord commented 2 years ago

yeah i probably broke this in this commit https://github.com/goolord/alpha-nvim/commit/23d90298d0ede40e80ed45db7acedc8981ae62e4, sorry everyone. i will look into fixing it when i have free time, i've been super busy but if anyone takes a crack at it in the meantime i can review : )