nvimdev / dashboard-nvim

vim dashboard
MIT License
2.22k stars 179 forks source link

Dashboard does not start on startup #376

Closed mr-scrpt closed 11 months ago

mr-scrpt commented 11 months ago

Describe the bug When starting nvim, the dashboard does not start, but it starts manually with the :Dashboard command.

To Reproduce

Using nvim 0.9.1 Lazy installer

{
    "glepnir/dashboard-nvim",
    event = "VimEnter",
    dependencies = { { "nvim-tree/nvim-web-devicons" } },
}

dashboard.lua file

local function default_header()
    return {
        "",
        "",
        "",
        "██████╗ ██╗   ██╗██████╗ ██████╗ ██╗     ███████╗",
        "██╔══██╗██║   ██║██╔══██╗██╔══██╗██║     ██╔════╝",
        "██████╔╝██║   ██║██████╔╝██████╔╝██║     █████╗  ",
        "██╔═══╝ ██║   ██║██╔══██╗██╔═══╝ ██║     ██╔══╝  ",
        "██║     ╚██████╔╝██║  ██║██║     ███████╗███████╗",
        "╚═╝      ╚═════╝ ╚═╝  ╚═╝╚═╝     ╚══════╝╚══════╝",
        "",
        "",
        "",
    }
end

require("dashboard").setup({
    theme = "doom",
    config = {
        header = default_header(),
        center = {
            {
                icon = "󰙅 ",
                icon_hl = "Title",
                desc = "Open tree",
                desc_hl = "String",
                key = "e",
                keymap = "SPC e",
                key_hl = "Number",
                action = ":Neotree float",
            },
            {
                icon = "󰈞 ",
                icon_hl = "Title",
                desc = "Find files",
                desc_hl = "String",
                key = "f",
                keymap = "SPC f f",
                key_hl = "Number",
                action = ":Telescope find_files",
            },
            {
                icon = " ",
                icon_hl = "Title",
                desc = "Find text",
                desc_hl = "String",
                key = "w",
                keymap = "SPC f w",
                key_hl = "Number",
                action = ":Telescope live_grep",
            },
            {
                icon = " ",
                icon_hl = "Title",
                desc = "Git Braches",
                desc_hl = "String",
                key = "b",
                keymap = "SPC g b",
                key_hl = "Number",
                action = ":Telescope git_branches",
            },
        },
    },
})

Expected behavior Opening dashboard on nvim startup

Screenshots

image

After command enter

image
mr-scrpt commented 11 months ago

I apologize, I was running nvim with a dot out of habit "nvim ."