-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme doom's content not vertically centered #354
Comments
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 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 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
The text was updated successfully, but these errors were encountered: