NvChad / NvChad

Blazing fast Neovim config providing solid defaults and a beautiful UI, enhancing your neovim experience.
https://nvchad.com/
GNU General Public License v3.0
24.44k stars 2.11k forks source link

Dashboard plugin doesn't work #587

Closed kamack38 closed 2 years ago

kamack38 commented 2 years ago

Describe the bug Even though I turned on dashboard plugin in chadrc.lua file, it still doesn't work. Also I turned on dashboard at vim enter, but it won't open and any keybindings of this plugin also don't work.

To Reproduce

M.plugins = {
   status {
      dashboard = true
   }
}

Expected behavior Dashboard opens at neovim enter.

Desktop (please complete the following information):

mister-coded commented 2 years ago

Do :PackerSync

kamack38 commented 2 years ago
Failed to update hrsh7th\nvim-cmp
peppapig450 commented 2 years ago

When was the last time you updated nvchad? nvim-cmp had a breaking change that was patched recently

kamack38 commented 2 years ago

I have the latest version obraz Edit: After updating packer I have no errors, but dashboard plugin still doesn't work

kamack38 commented 2 years ago

After running health checks I get


- WARNING: `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
- ERROR: lua(highlights): Failed to load parser: uv_dlopen: C:\Users\kamac\AppData\Local\nvim-data\site\pack\packer\opt\nvim-treesitter\parser\lua.so nie jest prawid<b3>ow<b9> aplikacj<b9> systemu Win32.

  - ERROR: lua(locals): Failed to load parser: uv_dlopen: error: 193
  - ERROR: lua(folds): Failed to load parser: uv_dlopen: error: 193
  - ERROR: lua(indents): Failed to load parser: uv_dlopen: error: 193
  - ERROR: lua(injections): Failed to load parser: uv_dlopen: error: 193
peppapig450 commented 2 years ago

Ill try it on a windows 10 vm when I'm done with homework. I am on Windows 11 Insider dev build so idk if it will work the same

peppapig450 commented 2 years ago

I think you forgot a comma actually. this is what my chadrc looks like and my dashboard works

local M = {}
M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {}

-- NOTE: To use this, make a copy with `cp example_chadrc.lua chadrc.lua`

--------------------------------------------------------------------

-- To use this file, copy the strucutre of `core/default_config.lua`,
-- examples of setting relative number & changing theme:

-- M.options = {
--    relativenumber = true,
-- }

 M.ui = {
   theme = "uwu"
 }

-- NvChad included plugin options & overrides

M.plugins = {
   options = {
      lspconfig = {
         setup_lspconf = "custom.plugins.lspconfig",
      },
   },
   status = {
      dashboard = true,
   },
   -- To change the Packer `config` of a plugin that comes with NvChad,
   -- add a table entry below matching the plugin github name
   --              '-' -> '_', remove any '.lua', '.nvim' extensions
   -- this string will be called in a `require`
   --              use "(custom.configs).my_func()" to call a function
   --              use "custom.blankline" to call a file
   default_plugin_config_replace = {},
 }
return M
caetano-dev commented 2 years ago

Thank you! My dashboard was not working either, but now it has been fixed. The problem was the comma.

siduck commented 2 years ago

https://user-images.githubusercontent.com/59060246/140235929-d9cb773f-8b37-4f02-9cf9-acbf02136c0f.mp4

peppapig450 commented 2 years ago

How was the ascii art generated by the way? I was trying to change it the other day but it kept looking bad D:

siduck commented 2 years ago

How was the ascii art generated by the way? I was trying to change it the other day but it kept looking bad D:

it depends on your terminal , if it supports boxdraw braillie then it'll make all the braillie chars ( dots ) look joined together , if you're on linux then you could use my st build . https://github.com/siduck76/st

peppapig450 commented 2 years ago

Thanks!

kamack38 commented 2 years ago

Actually, the config file was named chardrc.lua instead of chadrc.lua so I suppose this was the issue then, but adding commas also helped.

archiif commented 2 years ago

I'm also stuck with this issue, but the solutions above doesn't work. I know that nvim is detecting my chadrc.lua correctly because I can change my theme using it, but setting M.plugins.status.dashboard to true doesn't enable the dashboard even after :PackerSync. Seeing @siduck's video, you can see a Installed glepnir/dashboard-nvim message after finishing the sync, which doesn't show up on my side. What am I doing wrong here? Is there a change in the API since this issue? This is my chadrc.lua:

-- Just an example, supposed to be placed in /lua/custom/

local M = {}

-- make sure you maintain the structure of `core/default_config.lua` here,
-- example of changing theme:

M.ui = {
   theme = "gruvchad",
}

M.plugins = {
   status = {
      dashboard = true,
   },
}

return M
archiif commented 2 years ago

Ah, just found out that the plugin was replaced recently: https://github.com/NvChad/NvChad/commit/ceaf02e0bffe291a1377da907a5f45c78e1593bd Dashboard now works with M.plugins.status.alpha set to true

axl72 commented 2 years ago

A copy chadrc.lua config file from here and I got this.

local M = {}
M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {}

-- NOTE: To use this, make a copy with `cp example_chadrc.lua chadrc.lua`

--------------------------------------------------------------------

-- To use this file, copy the strucutre of `core/default_config.lua`,
-- examples of setting relative number & changing theme:

-- M.options = {
--    relativenumber = true,
-- }

-- NvChad included plugin options & overrides

M.plugins = {
   options = {
      lspconfig = {
         setup_lspconf = "custom.plugins.lspconfig",
      },
   },
   status = {
      dashboard = true,
   },
   -- To change the Packer `config` of a plugin that comes with NvChad,
   -- add a table entry below matching the plugin github name
   --              '-' -> '_', remove any '.lua', '.nvim' extensions
   -- this string will be called in a `require`
   --              use "(custom.configs).my_func()" to call a function
   --              use "custom.blankline" to call a file
   default_plugin_config_replace = {},
 }
return M

But nvim dosnt showes dashboard. I already did PackerSync.

NielsCodes commented 1 year ago

For anyone wanting to enable the dashboard, go to lua/plugins/init.lua and for goolord/alpha-nvim set disable = false.

["goolord/alpha-nvim"] = {
  after = "base46",
  disable = false,
  config = function()
    require "plugins.configs.alpha"
  end,
},
siduck commented 1 year ago

For anyone wanting to enable the dashboard, go to lua/plugins/init.lua and for goolord/alpha-nvim set disable = false.

["goolord/alpha-nvim"] = {
  after = "base46",
  disable = false,
  config = function()
    require "plugins.configs.alpha"
  end,
},

thats not the way, you have to do it in your custom config, just put this in your custom plugin list, reopen nvim and do packersync

["goolord/alpha-nvim"] = {
  disable = false,
},
NielsCodes commented 1 year ago

Whoops, I guess I got a little bit too excited about figuring out the wrong way myself. Thanks for the correction!

Khasirah commented 1 year ago

simplescreenrecorder-2021-11-04_05.15.43.mp4

i'm stuck alpha doesn't show up this is my tree folder and my chadrc

image

i already did :PackerSync

siduck commented 1 year ago

please reopen neovim and do packersync @Khasirah

Khasirah commented 1 year ago

please reopen neovim and do packersync @Khasirah

image still get same error

siduck commented 1 year ago

please reopen neovim and do packersync @Khasirah

image still get same error

status, options? there are no such plugins, you have something seriously wrong in your config :/

Khasirah commented 1 year ago

:(

siduck commented 1 year ago

:(

check our examples_config repo and use that as custom config, its a good starting point.

And no need to be sad! if it still doesnt work for you then you can ping me on our discord server :) , i'll help

JDeepD commented 1 year ago

Can confirm. This is the same issue with me. For some reason, all the options inside M.plugins are getting cloned. For this config,

M.plugins = {
  status = {
    dashboard = true,
  }
}

Packer is trying to clone https://github.com/status.git image

For @Khasirah , Packer is trying to clone status and options since he passed those in M.plugins

What worked for me is to enable this from example config

siduck commented 1 year ago

@JDeepD the status option is the old syntax and was removed ages ago

Vealcoo commented 1 year ago

@siduck It still doesnt work for me :( my neovim version is NVIM v0.8.2 and there is my setup

    ["goolord/alpha-nvim"] = {
      after = "base46",
      disable = false,
      config = function()
        require "plugins.configs.alpha"
      end,
    },
siduck commented 1 year ago

@siduck It still doesnt work for me :( my neovim version is NVIM v0.8.2 and there is my setup

    ["goolord/alpha-nvim"] = {
      after = "base46",
      disable = false,
      config = function()
        require "plugins.configs.alpha"
      end,
    },

dont add the after and config lines, only the disable line is enough. reopen neovim and do packersync

eyejayvee commented 1 year ago

This worked for me:

---@type ChadrcConfig
local M = {}

M.ui = {
    theme = 'catppuccin',
    nvdash = {      -- Dashboard
        load_on_startup = true
    }
}

return M