nvimdev / dashboard-nvim

vim dashboard
MIT License
2.3k stars 187 forks source link

custom_center not working anymore? #348

Closed pranavpa8788 closed 1 year ago

pranavpa8788 commented 1 year ago

neovim version: 0.9.0

I had been using dashboard for a while now, yesterday I lost all my config files and had to recover them. So I updated all my modules after recovering, because I had updated to neovim 0.9.0. Soon after that, my dashboard stopped working

My dashboard.lua file:

-- TODO: Fix functionality and keybindings
local home = "C:\\Users\\home_folder\\"
local db = require('dashboard')

db.preview_command = 'path_to_psh_script\\dashboard.ps1'
db.session_directory = 'path_to_sessions_folder\\sessions'

db.preview_file_path = ''
db.preview_file_height = 10
db.preview_file_width = 100

db.custom_center = {
    {icon = '   ',
    desc = 'New file                                 ',
    shortcut = '',
    action ='DashboardNewFile'},

    {icon = '   ',
    desc = 'NERDTree                                 ',
    shortcut = '',
    action ='NERDTree'},

    {icon = '   ',
    desc = 'Recently latest session                  ',
    shortcut = '',
    action ='SessionLoad'},

    {icon = '   ',
    desc = 'Recently opened files                    ',
    shortcut = '',
    action =  'Telescope oldfiles'},

    {icon = '   ',
    desc = 'Find  File                               ',
    shortcut = '',
    action = 'Telescope find_files cwd=' .. home .. 'Documents\\'},

    {icon = '   ',
    desc ='File Browser                             ',
    shortcut = '',
    action =  'Telescope file_browser path=' .. home .. 'Documents\\'},

    {icon = '   ',
    desc ='Install packages                         ',
    shortcut = '',
    action =  'PackerInstall'},

    {icon = '   ',
    desc ='Update packages                          ',
    shortcut = '',
    action =  'PackerSync --preview'},

    {icon = '   ',
    desc = 'Find  word                               ',
    shortcut = '',
    action = 'Telescope live_grep'},

    {icon = '   ',
    desc = 'Open dotfiles                            ',
    shortcut = '',
    action = 'Telescope dotfiles'},

    {icon = '   ',
    desc = 'Exit                                     ',
    shortcut = '',
    action = 'exit'},
}

My dashboard.ps1 contains:

cat path_to_ascii_header_file.txt | meow

And finally my init.lua contains (dashboard.lua is inside lua\user):

...
require("user.dashboard")

I have nvim-web-devicons installed as well vim-devicons (for NERDTree)

When I open vim its loaded with this dashboard, which isn't how the custom_center is supposed to look like: image

glepnir commented 1 year ago

read doc. 0.2.3 had been rewrite few moths ago.

pranavpa8788 commented 1 year ago

Thanks for the help. Is this the doc btw? https://github.com/nvimdev/dashboard-nvim/blob/master/doc/dashboard.txt

glepnir commented 1 year ago

it's generate from readme this file can read inside neovim.

pranavpa8788 commented 1 year ago

Gotcha, thanks again. I love this plugin, thanks for all the hardwork!