NvChad / ui

Lightweight & high performance UI plugin for nvchad
GNU General Public License v3.0
166 stars 124 forks source link

Nvdash won't open #66

Closed Hurricaane closed 1 year ago

Hurricaane commented 1 year ago

Describe the bug Hi ! I'm somewhat of a new user of neovim. I wanted to try Nvchad. Everything went great for the install, but when I want to setup Nvdash, it doesn't work. Nothing appears, even after inputting the command Nvdash.

Here's my chadrc.lua :

-- Chadrc file
-- Custom NvChad configuration (main file)
local M = {}

-- UI Settings
M.ui = {
  -- Theme
  theme = "onedark",
  -- Dashboard
  nvdash = {
    load_on_startup = true,

    header = {
      [[]],
      [[   ⣴⣶⣤⡤⠦⣤⣀⣤⠆     ⣈⣭⣭⣿⣶⣿⣦⣼⣆         ]],
      [[    ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦       ]],
      [[          ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷⠄⠄⠄⠄⠻⠿⢿⣿⣧⣄     ]],
      [[           ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄    ]],
      [[          ⢠⣿⣿⣿⠈  ⠡⠌⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀   ]],
      [[   ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘⠄ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄  ]],
      [[  ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷   ⢊⣿⣿⡏  ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄   ]],
      [[ ⣠⣿⠿⠛⠄⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄  ]],
      [[ ⠙⠃   ⣼⣿⡟  ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇⠄⠛⠻⢷⣄ ]],
      [[      ⢻⣿⣿⣄   ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆     ]],
      [[       ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃     ]],
      [[     ⢰⣶  ⣶ ⢶⣆⢀⣶⠂⣶⡶⠶⣦⡄⢰⣶⠶⢶⣦  ⣴⣶     ]],
      [[     ⢸⣿⠶⠶⣿ ⠈⢻⣿⠁ ⣿⡇ ⢸⣿⢸⣿⢶⣾⠏ ⣸⣟⣹⣧    ]],
      [[     ⠸⠿  ⠿  ⠸⠿  ⠿⠷⠶⠿⠃⠸⠿⠄⠙⠷⠤⠿⠉⠉⠿⠆   ]],
      [[]],
    },

    buttons = {
      { "  Find File", "Spc f f", "Telescope find_files" },
      { "  Recent Files", "Spc f o", "Telescope oldfiles" },
      { "  Find Word", "Spc f w", "Telescope live_grep" },
      { "  Bookmarks", "Spc b m", "Telescope marks" },
      { "  Themes", "Spc t h", "Telescope themes" },
      { "  Mappings", "Spc c h", "NvCheatsheet" },
    },
  },
}

return M

To Reproduce Steps to reproduce the behavior:

  1. Freshly install Nvchad (v2.0)
  2. Customize your chadrc.lua file to enable Nvdash on startup
  3. Restart neovim
  4. Launch command :Nvdash

Expected behavior A dashboard with my custom header.

Screenshots image

Desktop (please complete the following information):

siduck commented 1 year ago

image

works for me

siduck commented 1 year ago

Also please dont use [[]] for strings

siduck commented 1 year ago
 nvdash = {
    load_on_startup = true,
    header = {
      "   ⣴⣶⣤⡤⠦⣤⣀⣤⠆     ⣈⣭⣭⣿⣶⣿⣦⣼⣆         ",
      "    ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦       ",
      "          ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷⠄⠄⠄⠄⠻⠿⢿⣿⣧⣄     ",
      "           ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄    ",
      "          ⢠⣿⣿⣿⠈  ⠡⠌⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀   ",
      "   ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘⠄ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄  ",
      "  ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷   ⢊⣿⣿⡏  ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄   ",
      " ⣠⣿⠿⠛⠄⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄  ",
      " ⠙⠃   ⣼⣿⡟  ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇⠄⠛⠻⢷⣄ ",
      "      ⢻⣿⣿⣄   ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆     ",
      "       ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃     ",
      "     ⢰⣶  ⣶ ⢶⣆⢀⣶⠂⣶⡶⠶⣦⡄⢰⣶⠶⢶⣦  ⣴⣶     ",
      "     ⢸⣿⠶⠶⣿ ⠈⢻⣿⠁ ⣿⡇ ⢸⣿⢸⣿⢶⣾⠏ ⣸⣟⣹⣧    ",
      "     ⠸⠿  ⠿  ⠸⠿  ⠿⠷⠶⠿⠃⠸⠿⠄⠙⠷⠤⠿⠉⠉⠿⠆   ",
    },
  },
siduck commented 1 year ago

image

siduck commented 1 year ago

and then you can override nvdash highlight groups to invert the colors etc

Hurricaane commented 1 year ago

I reinstalled Nvchad, and launched :Nvdash which worked with the default config, but as soon as I change the config (replacing [[]] by ""), nothing works...

I don't know what I am doing wrong

siduck commented 1 year ago

@Hurricaane can you make a video? I find it hard to believe!

siduck commented 1 year ago

and make sure your fontsize isnt large or else the dashboard height wont be sufficient and hence dashboard wont open

Hurricaane commented 1 year ago

It was the fontsize (I feel dumb...) Sorry for the disturbance and thank you !

inneroot commented 1 year ago

and then you can override nvdash highlight groups to invert the colors etc

@siduck Can you please share how to disable inverting of the picture? I the example in https://nvchad.com/docs/features dashboard screenshot, but cant find proper value in config

siduck commented 1 year ago

@inneroot read https://nvchad.com/docs/config/theming

1) find highlight groups associated with nvdash ( within base46 repo itself's integration dir ) 2) add them to hl_override

Or if you are lazy to find in that repo, just type nvdash in hl_override table and u will see the available hl groups, thanks to lucario

image

so just set there bg to "none" and fg to some color :D

inneroot commented 1 year ago

Thx, @siduck, found config in NvChad/base46 repo Applied to chadrc.lua

M.ui = {
  hl_override = {
    NvDashAscii = {
      fg = "blue",
      bg = "black",
    },
  },

image