snacks.nvim icon indicating copy to clipboard operation
snacks.nvim copied to clipboard

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

Open dsully opened this issue 1 month ago • 1 comments

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 avatar Jan 03 '25 23:01 dsully