nvimdev / dashboard-nvim

vim dashboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recent projects list number limit not working.

ffekirnew opened this issue · comments

In the hyper.lua file (lua/dashboard/theme), you can set the limit of recent projects displayed, but when run, the dashboard always displays 1 more than the limit.

Steps to reproduce the behavior:

  1. Go to lua/dashboard/theme'/hyper.lua, line 115, set it to any number (and be mindful of it.)
  2. Exit out of nvim
  3. Restart nvim, you will see 1 more than the limit you expect

After setting the limit to a number like, say 3, you expect the dashboard to display only 3 recent projects, but rather it will display 4.

image
image

my computer is broken please wait…

It's okay, take your time. It's not a big issue; just wanted to let you know of this bug on an otherwise awesome software you created.

@glepnir for me it is quite the opposite. only one project is showing.

How does it find the recent project? could you please point me the code line number ?

Now I'm getting "empty project" always after deleting the project.

How the project is added? How to open a project? I open project like nvim ~/my project

This is the path to the file: ./lua/dashboard/themehyper.lua:115. It works very well for me as I open my projects by first navigating to the project directory then starting up Neovim. Like so:

cd project/directory/
nvim

I think you'll have to do this. Neovim considers the directory from which you started up the project to be the project. For example, if you are in your home directory

$ ~

And then start Neovim from there, regardless of the location of your project,

$ ~ nvim ~/my project

The root directory will be the one to be recorded as the project. Thus dashboard is showing you one project, and rightly so, because you are always opening the projects from one directory.