Open xfdj opened 1 year ago
please waiting for next version
Thank you!
I would also love to see this. Any updates?
I'm also interested in this issue, here is one small thing I noticed, maybe it will help:
I tried to add empty lines at the top of my logo in attempt to temporarily fix the centering issue, but it doesn't have any effect. But when I open some files and then use the Dashboard
command to come back, then it looks correct.
Also it behaves differently in Alacritty and in Wezterm. In Alacritty, the empty lines helped.
You can inject spaces into the header itself to get this behavior but it is kinda hacky
local api = vim.api
local function generate_empty_lines(size)
local fill = {}
for _ = 1, size do
table.insert(fill, "")
end
return fill
end
local function center_header(header)
local size = math.floor(vim.o.lines / 2)
- math.ceil(#header / 2)
- 2
local fill = generate_empty_lines(size)
return vim.list_extend(fill, header)
end
local header_content = {
[[ ]],
[[ header ]],
[[ ]],
}
return {
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup({
theme = 'doom',
config = {
header = center_header(header_content),
...
I've made a PR #476 for this, but I think it needs more testing. Could someone please check it?
Describe the bug
My config:
The content goes to the top of my window, not the center of it.
Theme hyper is correct:
I wonder if it is because the code below is missing in
function theme_instance
inlua/dashboard/theme/doom.lua
:I found the code in theme hyper's file. I don't know if it is a bug or a feature.
PS: Forgive my poor English.
To Reproduce
Expected behavior
Screenshots