dashboard-nvim icon indicating copy to clipboard operation
dashboard-nvim copied to clipboard

dashboard-nvim not oppening

Open zykron1 opened this issue 2 years ago • 13 comments

Hi i'm a new user and am using the default setup.

Setup:

local db = require("dashboard")
db.setup({
  theme = 'doom',
  config = {
    header = {}, --your header
    center = {
      {
        icon = ' ',
        icon_hl = 'Title',
        desc = 'Find File           ',
        desc_hl = 'String',
        key = 'b',
        keymap = 'SPC f f',
        key_hl = 'Number',
        action = 'lua print(2)'
      },
      {
        icon = ' ',
        desc = 'Find Dotfiles',
        key = 'f',
        keymap = 'SPC f d',
        action = 'lua print(3)'
      },
    },
    footer = {}  --your footer
  }
})

When I open neovim, I don't see the dashboard

zykron1 avatar May 30 '23 21:05 zykron1

any error through ? which plugin manager you used?

glepnir avatar May 31 '23 01:05 glepnir

any error through ? which plugin manager you used?

I'm getting the same problem using packer.

Using the configuration for packer as shown in the README yields no output on startup and no errors. Calling :Dashboard however shows the correct output.

Ditching the following lines in my packer file

		config = function()
			require("dashboard").setup(require("user.dashboard"))
		end,

and using

require('user.dashboard')

in my init.lua, where user.dashboard contains

return {
    theme = hyper,
    ...
}

shows the correct output on startup but with the following errors

Error detected while processing /home/cinder/.repos/nvim/init.lua:
E5113: Error while calling lua chunk: /home/cinder/.config/nvim/lua/user/dashboard.lua:1: module 'dashboard' not found:
	no field package.preload['dashboard']
	no file './dashboard.lua'
	no file '/home/cinder/Desktop/neovim/.deps/usr/share/luajit-2.1.0-beta3/dashboard.lua'
	no file '/usr/local/share/lua/5.1/dashboard.lua'
	no file '/usr/local/share/lua/5.1/dashboard/init.lua'
	no file '/home/cinder/Desktop/neovim/.deps/usr/share/lua/5.1/dashboard.lua'
	no file '/home/cinder/Desktop/neovim/.deps/usr/share/lua/5.1/dashboard/init.lua'
	no file './dashboard.so'
	no file '/usr/local/lib/lua/5.1/dashboard.so'
	no file '/home/cinder/Desktop/neovim/.deps/usr/lib/lua/5.1/dashboard.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
	[C]: in function 'require'
	/home/cinder/.config/nvim/lua/user/dashboard.lua:1: in main chunk
	[C]: in function 'require'
	/home/cinder/.repos/nvim/init.lua:18: in main chunk

This is all using Neovim version 0.9.1

Thanks btw for an awesome plugin!

mikaeleythor avatar Jun 04 '23 18:06 mikaeleythor

/home/cinder/.config/nvim/lua/user/dashboard.lua:1: module 'dashboard' not found:

this mean it not loaded . in fact it's not in runtimepath. so you may need check your packer config.

glepnir avatar Jun 05 '23 00:06 glepnir

Hi i'm a new user and am using the default setup.

Setup:

local db = require("dashboard")
db.setup({
  theme = 'doom',
  config = {
    header = {}, --your header
    center = {
      {
        icon = ' ',
        icon_hl = 'Title',
        desc = 'Find File           ',
        desc_hl = 'String',
        key = 'b',
        keymap = 'SPC f f',
        key_hl = 'Number',
        action = 'lua print(2)'
      },
      {
        icon = ' ',
        desc = 'Find Dotfiles',
        key = 'f',
        keymap = 'SPC f d',
        action = 'lua print(3)'
      },
    },
    footer = {}  --your footer
  }
})

When I open neovim, I don't see the dashboard

Did you get a solution for this I am unable to change the default header. i am a super newbie

gitrospective avatar Jun 10 '23 11:06 gitrospective

:set rtp? then check output did you find dashboard ?

glepnir avatar Jun 10 '23 11:06 glepnir

Output: runtimepath=~/.config/nvim,/etc/xdg/nvim,~/.local/share/nvim/site,~/.local/share/nvim/site/pack//start/,~/.local/share/nvim/site/pack/packer/start/packe r.nvim,/usr/local/share/nvim/site,/usr/share/nvim/site,/opt/local/share/nvim/runtime,/opt/local/share/nvim/runtime/pack/dist/opt/matchit,/opt/local/lib/nvim ,~/.local/share/nvim/site/pack//start//after,/usr/share/nvim/site/after,/usr/local/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/afte r,~/.config/nvim/after

In the packer folders, I can say that dashboard.nvim lives there.

zykron1 avatar Jun 18 '23 16:06 zykron1

nope . it should show dashboard-nvim in rtp

glepnir avatar Jun 19 '23 06:06 glepnir

I am getting exactly the same error. Weird enough everything has been working for months without any issue, but when I switched from using impatient.nvim to vim.loader.enable() to cache lua, the error started appearing.

So this might mean that error comes when compiling the lua packages.

BTW, the output of my set rtp? is:

runtimepath=~/.config/nvim,/etc/xdg/nvim,~/.local/share/nvim/site,~/.local/share/nvim/site/pack/packer/opt/dashboard-nvim,~/.local/share/nvim/site/pack/*/start/*,~/.l
ocal/share/nvim/site/pack/packer/start/packer.nvim,/usr/local/share/nvim/site,/usr/share/nvim/site,/usr/share/nvim/site/pack/*/start/*,/usr/share/nvim/site/pack/packer/
start/packer.nvim,/usr/share/nvim/runtime,/usr/share/nvim/runtime/pack/dist/opt/matchit,/usr/lib/nvim,~/.local/share/nvim/site/pack/*/start/*/after,/usr/share/nvim/site
/after,/usr/local/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/after,~/.config/nvim/after,/usr/share/vim/vimfiles

I am also running neovim 0.9.1. Whenever I reinstall impatient.nvim again, the plugin works again.

EDIT: Fixed the problem with the solution provided in #294.

Yoquec avatar Jun 20 '23 16:06 Yoquec

I had a same issue, and found solution.. dashboard default installation path was ~/.local/share/nvim/site/pack/packer/opt after moving into ~/.local/share/nvim/site/pack/packer/start everything starts working again, until PackerSync. Hope it will helps.

jakucermak avatar Jul 02 '23 18:07 jakucermak

Same proble here, the solution proposed by @jakucermak worked for me, but only when I opened the vim from the terminal with nvim. If I open a project on the current folder with vim . and then I try to open Dashboard it just does nothing.

lucasmarinb avatar Jul 19 '23 06:07 lucasmarinb

This is what I observed (when I installed dashboard-nvim via packer, I was unable to configure it). Packer installs to different directories based on the event.

The Step 4 example works for me (dashboard starts up and is configurable). Step 2 does not work for me (dashboard starts up but is not configurable).

  1. Blank slate

    -- use {
    --   'glepnir/dashboard-nvim',
    --   event = 'VimEnter',
    --   config = function()
    --     require('my-dashboard')
    --   end,
    --   requires = {'nvim-tree/nvim-web-devicons'}
    -- }
    
    :so
    :PackerClean
    
    $ rg --files | rg dashboard-nvim
    
    
  2. Install with VimEnter (goes to opt folder)

    use {
      'glepnir/dashboard-nvim',
      event = 'VimEnter',
      config = function()
        require('my-dashboard')
      end,
      requires = {'nvim-tree/nvim-web-devicons'}
    }
    
    :so
    :PackerSync
    
     $ rg --files | rg dashboard-nvim
    site/pack/packer/opt/dashboard-nvim/plugin/dashboard.lua
    site/pack/packer/opt/dashboard-nvim/README.md
    site/pack/packer/opt/dashboard-nvim/LICENSE
    site/pack/packer/opt/dashboard-nvim/doc/dashboard.txt
    site/pack/packer/opt/dashboard-nvim/doc/tags
    site/pack/packer/opt/dashboard-nvim/lua/dashboard/init.lua
    site/pack/packer/opt/dashboard-nvim/lua/dashboard/events.lua
    site/pack/packer/opt/dashboard-nvim/lua/dashboard/preview.lua
    site/pack/packer/opt/dashboard-nvim/lua/dashboard/theme/hyper.lua
    site/pack/packer/opt/dashboard-nvim/lua/dashboard/theme/doom.lua
    site/pack/packer/opt/dashboard-nvim/lua/dashboard/theme/header.lua
    site/pack/packer/opt/dashboard-nvim/lua/dashboard/utils.lua
    #      look here ^^^
    
  3. Blank slate

    -- use {
    --   'glepnir/dashboard-nvim',
    --   event = 'VimEnter',
    --   config = function()
    --     require('my-dashboard')
    --   end,
    --   requires = {'nvim-tree/nvim-web-devicons'}
    -- }
    
    :so
    :PackerClean
    
    $ rg --files | rg dashboard-nvim
    
    
  4. Install without event (goes to start folder)

    use {
      'glepnir/dashboard-nvim',
      -- event = 'VimEnter',
      config = function()
        require('my-dashboard')
      end,
      requires = {'nvim-tree/nvim-web-devicons'}
    }
    
    :so
    :PackerClean
    
     $ rg --files | rg dashboard-nvim
    site/pack/packer/start/dashboard-nvim/README.md
    site/pack/packer/start/dashboard-nvim/lua/dashboard/events.lua
    site/pack/packer/start/dashboard-nvim/lua/dashboard/init.lua
    site/pack/packer/start/dashboard-nvim/lua/dashboard/utils.lua
    site/pack/packer/start/dashboard-nvim/lua/dashboard/preview.lua
    site/pack/packer/start/dashboard-nvim/lua/dashboard/theme/doom.lua
    site/pack/packer/start/dashboard-nvim/lua/dashboard/theme/header.lua
    site/pack/packer/start/dashboard-nvim/lua/dashboard/theme/hyper.lua
    site/pack/packer/start/dashboard-nvim/LICENSE
    site/pack/packer/start/dashboard-nvim/plugin/dashboard.lua
    site/pack/packer/start/dashboard-nvim/doc/dashboard.txt
    site/pack/packer/start/dashboard-nvim/doc/tags
    #      look here ^^^^
    

NonlinearFruit avatar Jul 21 '23 21:07 NonlinearFruit

Thanks @NonlinearFruit for the tip, now I am able to make the dashboard to display. I'm not sure why Packer does this and why it is not working correctly. I've installed other plugins that have the event property and surely they did not work until I installed them into the start folder.

data-miner00 avatar Oct 15 '23 11:10 data-miner00

Having the same issue but with Lazy. when I enter Nvim the dashboard doesnt show even when using :Dashboard it doesnt show. No errors given so idk whats up

SchoolyB avatar Dec 04 '23 16:12 SchoolyB