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

feat(dashboard): allow text keys and preset.header to be functions #420

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

dsully
Copy link

@dsully dsully commented Jan 3, 2025

Description

Add the ability for text keys and preset.header to be functions.

This allows me to call this:

preset = {
    header = function()
        local heatmap = require("git-dashboard-nvim").heatmap()

        -- This triggers git-dashboard-nvim's highlights
        vim.cmd.doautocmd("FileType")

        return { table.concat(heatmap, "\n") }
    end,
    ...
}

@dsully
Copy link
Author

dsully commented Jan 19, 2025

Gentle bump..

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

Successfully merging this pull request may close these issues.

1 participant