goolord / alpha-nvim

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

[feature] padding between components #216

Closed TheElegantCoding closed 1 year ago

TheElegantCoding commented 1 year ago

i will like to dont repeat the margin between all the components i the layout of alpha so if a have

        layout = {
            header,
            { type = 'padding', val = 1 },
            header_welcome,
            { type = 'padding', val = 1 },
            title('Quick links', 16),
            { type = 'padding', val = 1 },
            shortcuts,
            { type = 'padding', val = 1 },
            title('Project', 11),
            { type = 'padding', val = 1 },
            projects,
            { type = 'padding', val = 1 },
            fortune,
            { type = 'padding', val = 1 },
            github,
        },

i always repeat the padding, even if i make a function is the same so my idea is to have a global option in opts that allow to have padding between elements like this

    layout = {
        header,
        header_welcome,
        title('Quick links', 16),
        shortcuts,
        title('Project', 11),
        projects,
        fortune,
        github,
    },
    opts = {
        padding = 1
    }

it is like margin property but this is in elements

goolord commented 1 year ago

already a thing https://github.com/goolord/alpha-nvim/blob/1838ae926e8d49fe5330d1498ee8289ae2c340bc/doc/alpha.txt#L156-L157C7