Skip to content
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

How to configure startify ? #99

Closed
nathani-axis opened this issue Apr 7, 2022 · 2 comments
Closed

How to configure startify ? #99

nathani-axis opened this issue Apr 7, 2022 · 2 comments

Comments

@nathani-axis
Copy link

hey, I'm trying to understand how to configure the startify elements. Specifically I'd want to have all the recent files in the current project/folder to appear first, and either have the recent files globally to be the second list, or just gone.

Is there a place I can into that has the configuration, and that I can play with ? I'd be happy to try stuff but I have no idea where to start ^^

@goolord
Copy link
Owner

goolord commented Apr 7, 2022

local startify = require('alpha.themes.startify')

startify.config.layout = {
    { type = "padding", val = 1 },
    startify.sections.header,
    { type = "padding", val = 2 },
    startify.section.top_buttons,
    { -- mru_cwd
        type = "group",
        val = {
            { type = "padding", val = 1 },
            { type = "text", val = mru_title, opts = { hl = "SpecialComment", shrink_margin = false } },
            { type = "padding", val = 1 },
            {
                type = "group",
                val = function()
                    return { mru(0, vim.fn.getcwd()) }
                end,
                opts = { shrink_margin = false },
            },
        },
    },
    { -- mru
        type = "group",
        val = {
            { type = "padding", val = 1 },
            { type = "text", val = "MRU", opts = { hl = "SpecialComment" } },
            { type = "padding", val = 1 },
            {
                type = "group",
                val = function()
                    return { mru(10) }
                end,
            },
        },
    },
    { type = "padding", val = 1 },
    startify.section.bottom_buttons,
    startify.section.footer,
}

require('alpha').setup(startify.config)

if you want to get really deep into it, I would read the source code for the 3 available themes. there's also thorough documentation for alpha's different element types @ https://github.com/goolord/alpha-nvim/blob/main/doc/alpha.txt#L30, there's also some theme-specific configuration examples later in the docs

@goolord goolord closed this as completed Apr 7, 2022
@goolord
Copy link
Owner

goolord commented Apr 7, 2022

also, tracking a sort of 'easy mode' config option for swapping mru and mru_cwd

#97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants