-
Notifications
You must be signed in to change notification settings - Fork 187
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
[WIP] Center the whole menu #401
base: master
Are you sure you want to change the base?
Conversation
Just fyi I've been using this branch for a while now with no problems |
Nice feature. Can't wait. Please merge, please. |
I've been running this at work for a while with my colleagues. |
How would I go about using this in my configuration to center my menu as well? So, there's this new variable, but how can I use it? I didn't find anything in |
Was this ever merged into master? |
|
Hello, I would really love to have this feature. Will it ever be merged? |
The custom headers is not centered in this branch, here is my minimal lazy.nvim config that works: return {
"mhinz/vim-startify",
branch = "center",
config = function()
vim.g.startify_center = 50
local function get_padding()
local padding_left = 3
if vim.g.startify_center then
padding_left = math.floor((vim.fn.winwidth("%") - vim.g.startify_center) / 2)
end
return string.rep(" ", padding_left)
end
vim.g.startify_lists = {
{ type = "sessions", header = { get_padding() .. "Sessions" } },
{ type = "dir", header = { get_padding() .. "Most Recently Used (MRU)" } },
{ type = "dir", header = { get_padding() .. "(MRU) " .. vim.fn.getcwd() } },
{ type = "bookmarks", header = { get_padding() .. "Bookmarks" } },
}
end,
} |
This is a PR for playing around with centering the menu.
Introduces:
g:startify_center
. This option should be set to the longest line you expect in the menu. Values between50
-80
probably make sense. Just play around a bit.