GithubHelp home page GithubHelp logo

dashboard-nvim's Introduction

Fancy and Blazing Fast start screen plugin of neovim

Hyper Doom

Feature

  • Low memory usage. dashboard does not store the all user configs in memory like header etc these string will take some memory. now it will be clean after you open a file. you can still use dashboard command to open a new one , then dashboard will read the config from cache.
  • Blazing fast

Install

  • Lazy.nvim
{
  'nvimdev/dashboard-nvim',
  event = 'VimEnter',
  config = function()
    require('dashboard').setup {
      -- config
    }
  end,
  dependencies = { {'nvim-tree/nvim-web-devicons'}}
}
  • Packer
use {
  'nvimdev/dashboard-nvim',
  event = 'VimEnter',
  config = function()
    require('dashboard').setup {
      -- config
    }
  end,
  requires = {'nvim-tree/nvim-web-devicons'}
}

Configuration

Options

theme = 'hyper' --  theme is doom and hyper default is hyper
disable_move    --  default is false disable move keymap for hyper
shortcut_type   --  shorcut type 'letter' or 'number'
change_to_vcs_root -- default is false,for open file in hyper mru. it will change to the root of vcs
config = {},    --  config used for theme
hide = {
  statusline    -- hide statusline default is true
  tabline       -- hide the tabline
  winbar        -- hide winbar
},
preview = {
  command       -- preview command
  file_path     -- preview file path
  file_height   -- preview file height
  file_width    -- preview file width
},

Theme config

the config field is used for theme. general field

config = {
  header -- type is table def
  week_header = {
    enable  --boolean use a week header
    concat  --concat string after time string line
    append  --table append after time string line
  },
  disable_move  -- boolean default is false disable move key
}

Hyper

when use hyper theme the available options in config is

config = {
  shortcut = {
    -- action can be a function type
    { desc = string, group = 'highlight group', key = 'shortcut key', action = 'action when you press key' },
  },
  packages = { enable = true }, -- show how many plugins neovim loaded
  -- limit how many projects list, action when you press key or enter it will run this action.
  -- action can be a functino type, e.g.
  -- action = func(path) vim.cmd('Telescope find_files cwd=' .. path) end
  project = { enable = true, limit = 8, icon = 'your icon', label = '', action = 'Telescope find_files cwd=' },
  mru = { limit = 10, icon = 'your icon', label = '', cwd_only = false },
  footer = {}, -- footer
}

Doom

when use doom theme the available options in config is

config = {
  center = {
    {
      icon = '',
      icon_hl = 'group',
      desc = 'description',
      desc_hl = 'group',
      key = 'shortcut key in dashboard buffer not keymap !!',
      key_hl = 'group',
      key_format = ' [%s]', -- `%s` will be substituted with value of `key`
      action = '',
    },
  },
  footer = {},
}

notice if you don't link config every highlight group. you can ignore this key. dashboard will use default highlight group like DashboardKey/Icon/Desc instead

Commands

  • Dashboard open dashboard
  • DbProjectDelete count delete project in cache works for hyper theme. count is number
  • DashboardUpdateFooter updates the content of the Footer

Highlight

all highlight groups

-- General
DashboardHeader DashboardFooter
-- Hyper theme
DashboardProjectTitle DashboardProjectTitleIcon DashboardProjectIcon
DashboardMruTitle DashboardMruIcon DashboardFiles DashboardShortCutIcon
-- Doome theme
DashboardDesc DashboardKey DashboardIcon DashboardShortCut

Example config

example config of screenshot

Hyper
  db.setup({
    theme = 'hyper',
    config = {
      week_header = {
       enable = true,
      },
      shortcut = {
        { desc = '󰊳 Update', group = '@property', action = 'Lazy update', key = 'u' },
        {
          icon = '',
          icon_hl = '@variable',
          desc = 'Files',
          group = 'Label',
          action = 'Telescope find_files',
          key = 'f',
        },
        {
          desc = ' Apps',
          group = 'DiagnosticHint',
          action = 'Telescope app',
          key = 'a',
        },
        {
          desc = ' dotfiles',
          group = 'Number',
          action = 'Telescope dotfiles',
          key = 'd',
        },
      },
    },
  })
Doom
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',
        key_format = ' %s', -- remove default surrounding `[]`
        action = 'lua print(2)'
      },
      {
        icon = '',
        desc = 'Find Dotfiles',
        key = 'f',
        keymap = 'SPC f d',
        key_format = ' %s', -- remove default surrounding `[]`
        action = 'lua print(3)'
      },
    },
    footer = {}  --your footer
  }
})
Changed
  • Removed Session as a start screen plugin speed is first.if you want use session you can take a look at glepnir/dbsession.nvim
  • Removed Ueberzug script, as the Ueberzug author has deleted the repository.

TODO

  • I will write a plugin to implement some popular terminal evaluators image protocol then I think can make it work with dashboard

Backers

@RakerZh

Donate

If you'd like to support my work financially, buy me a drink through Github Sponsor or

LICENSE

MIT

dashboard-nvim's People

Contributors

abaofromcug avatar acksld avatar agusdmb avatar ahmedkhalf avatar akring avatar anurag3301 avatar carbosauce avatar carlos-algms avatar claidler avatar curs3w4ll avatar diego-treitos avatar erven2016 avatar github-actions[bot] avatar glepnir avatar hlcfan avatar ilan-schemoul avatar kihau avatar mangkoran avatar minusfive avatar ndom91 avatar nemo256 avatar phoenixfec avatar plankcipher avatar polirritmico avatar rhcher avatar rockerboo avatar siansiansu avatar ssxwcz avatar tkhg avatar xenophex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashboard-nvim's Issues

dashboard_preview_file not cleared with e.g. DashboardNewFile

I'm using let g:dashboard_preview_file = '~/.config/nvim/motd', which is a file that contains shell control chars. When I run the DashboardNewFile command, the contents from the dashboard_preview_file are still being displayed and not cleared off the screen. The writing in i mode then happens "behind" the contents.

What is the logo's font?

Maybe it is not an issue, but could I know how can I created the logo like this? Is it output by figlet? If so, what's the figlet's font?

run autocmd on dashboard?

Hi,

I just installed dashboard-vim to replace Startify (or to see whether it can do that, because I just realized how much I rely on startify now that it is gone :D). I have not made up my mind yet, but it does seem really awesome; I just kinda miss seeing the recently edited files and opening them by number, but perhaps I can change my workflow. Anyway, that is not what this is about.

Actual Question

Is it possible to run autocmnds on the dashboard? I use Yggdroot/indentline, which is configured to display tabs. This makes the dashboard look ugly, as there are "random" vertical lines where there should be noting at all. While I can manually run IndentLineToggle, I'd prefer to automatically run this when dashboard-vim is started (and ideally when it's closed again so I got my indentation visible in regular text files again).

I tried :echo @% to determine what the buffer is titled (will usually return something like /home/me/.config/nvim/init.vim), but it will return nothing / empty string for the dashboard when opening vim.

Btw., I just tested, and the very same happens when running :Startify, so this doesn't seem to be a bug per se, but it'd still be nice if there was a way to fix this.

Thank you for your help :)

[Bugs] Several Issues With Telescope...

Hello, I am experiencing several issues with telescope and I am not sure if the problem is from dashboard or telescope itself.

  1. number and sign column are not visible after using telescope:
    Steps to reproduce:

    1. set number and set signcolumn=yes in init.vim
    2. select a a recently opened file from dashboard-nvim
    3. to your horror, when the file is open, it does not have a number and sign column
  2. Pressing escape when telescope is on creates an empty buffer and closes dashboard-nvim
    Expected behavior: Pressing escape should return me to the dashboard-nvim and not creates an empty buffer...

  3. Pressing ctrl-j & ctrl-k does not bring my cursor up or down in telescope but instead write the ctrl character in the text box.

Example showing how to add loaded plugins

This might seems sort of obscure but in the examples in the wiki the default has a footer of "neovim loaded 63 plugins". It's not in the README but skimming through the code it looks like this information is obtained by using the dein plugin manager.

Maybe have a section in the wiki for code snippets for getting the same the in the footer. For example if the user has fd installed and is using packer to install plugins.

" we ignore the directories 'start' and 'opt'
let g:total_plugins = trim(system("fd -d 2 . $HOME'/.local/share/nvim/site/pack/packer' | head -n -2 | wc -l"))
let g:dashboard_custom_footer = ['                               loaded '. g:total_plugins .' plugins     ']

Note ~/.local/share/nvim/site/pack/*/opt and ~/.local/share/nvim/site/pack/*/start are the default runtime for plugins in neovim. Any plugin manager that installs to this directory can use this could if they change packer to whatever their package manager uses.

Customization?

Hi! First, thanks for the awesome plugin!

I noticed that there's no way to override the commands used for the different shortcuts (if there's I wasn't able to find it).

For example, in order to find a work I prefer to use Ag instead of Rg.

Another example could be customizing the popup that appears when using fzf.

Are there any plans on adding this possibilities?

Disable on startup?

I have a bash alias to start nvim in "scratchpad mode" (using Codi).
I'd like my alias to disable dashboard-nvim on startup (with e.g. using something like Startify's g:startify_disable_at_vimenter = 1). Is it currently possible?

Session Load/Save Hooks

Greetings @glepnir,

Thank you for work on this amazing plugin. It modernizes the neovim setup quite much. Is it possible to embed in session load/save's like pre and post commands?

I want to close out empty buffers whenever I open a session because I sometimes have leftover directory buffer or some random empty buffers on the session. Is this something possible or am I missing something that is already implemented in?

Error when trying to set custom icons

2020-12-14_13-02

i am using:

    let g:dashboard_custom_shortcut={
      \ 'last_session'       : 'SPC s l',
      \ 'find_history'       : 'SPC f h',
      \ 'find_file'          : 'SPC f f',
      \ 'new_file'           : 'SPC c n',
      \ 'change_colorscheme' : 'SPC t c',
      \ 'find_word'          : 'SPC f a',
      \ 'book_marks'         : 'SPC f b',
      \ }

 let g:dashboard_custom_shortcut_icon['last_session'] = ' '
 let g:dashboard_custom_shortcut_icon['find_history'] = 'ﭯ '
 let g:dashboard_custom_shortcut_icon['find_file'] = ' '
 let g:dashboard_custom_shortcut_icon['new_file'] = ' '
 let g:dashboard_custom_shortcut_icon['change_colorscheme'] = ' '
 let g:dashboard_custom_shortcut_icon['find_word'] = ' '
 let g:dashboard_custom_shortcut_icon['book_marks'] = ' '

As in the readme, but it returns me this error on the screenshot.

Use split size to scale the dashboard instead of the window size

How hard would it be to scale the dashboard based on the split size instead of the whole terminal window size? For example, right now this is what happens when I try to open the dashboard in two different vertical splits:
Screenshot 2020-11-17 at 13 46 32.
I'm not sure but I think this happens because it's trying to adapt to the size of the terminal, not to the size of its current vim split.
Would also be great to automatically adjust to window or split resize. In my .vimrc I have autocmd VimResized * wincmd =, this automatically balances the splits when I resize the terminal window, the dashboard may be refreshed in this scenario and also in the "split changed size" scenario (I think there's already an autocmd event option for that).

Thank you for this amazing dashboard plugin by the way :)

Removes line numbers after opening

It seems the line numbers are removed after opening (as well as other settings) depending on the text size relative to the terminal size.

numbers not working with fontsize 11
image

numbers working with fontsize 10
image

This is relative to you terminal window so it takes some adjusting.

The above pictures are in alacritty, I have also tested on iterm2

laststatus=0

when I load the seesion, the spaceline disappear. And the laststatus=0
image
当我从dashboard界面使用快捷键加载session,进入文件编辑界面后,spaceline没有出现。我检查laststatus的值=0

Dashboard disappear after exiting telescope

When opening neovim, the dashboard appears like it should. If using a command like find word, or find recently opened files from telescope, the dashboard disappears when exiting telescope. The weird thing is that this only happens if the terminal window size is smaller than a certain size. If the terminal window is taking up the entire screen, this does not happen, but with the default size when opening a new window, this bug happens.

If it's helping, I am using macOS with iTerm2, and here is my minimal init.vim

call plug#begin('~/.vim/plugged')
    Plug 'glepnir/dashboard-nvim'
    Plug 'nvim-telescope/telescope.nvim'
    Plug 'nvim-lua/popup.nvim'
    Plug 'nvim-lua/plenary.nvim'
call plug#end()

set termguicolors

lua require'config/telescope'
lua require'config/dashboard'

config/telescope:

local utils = require'utils'
local map = utils.map

map('', '<C-p>', ':update <bar> :Telescope find_files<CR>', {noremap = false})
map('n', '<leader>a', ':Telescope live_grep<CR>', {noremap = false})
map('n', '<C-t>', ':tabedit <bar> :Telescope find_files<CR>', {noremap = false})

require('telescope').setup{}

config/dashboard:

local g = vim.g

g.dashboard_default_executive = 'telescope'
g.dashboard_custom_footer = {''}
g.dashboard_custom_section = {
    find_history = {
        description = {'  Recently opened files'},
        command = 'DashboardFindHistory'
    },
    find_word = {
        description = {'  Find word            '},
        command = 'DashboardFindWord'
    },
    last_session = {
        description = {'  New file             '},
        command = 'DashboardNewFile'}
    }

g.dashboard_custom_header = {
    "",
    "",
    "",
    "                    'c.        ",
    "                 ,xNMM.        ",
    "               .OMMMMo         ",
    "               OMMM0,          ",
    "     .;loddo:' loolloddol;.    ",
    "   cKMMMMMMMMMMNWMMMMMMMMMM0:  ",
    " .KMMMMMMMMMMMMMMMMMMMMMMMWd.  ",
    " XMMMMMMMMMMMMMMMMMMMMMMMX.    ",
    ";MMMMMMMMMMMMMMMMMMMMMMMM:     ",
    ":MMMMMMMMMMMMMMMMMMMMMMMM:     ",
    ".MMMMMMMMMMMMMMMMMMMMMMMMX.    ",
    " kMMMMMMMMMMMMMMMMMMMMMMMMWd.  ",
    " .XMMMMMMMMMMMMMMMMMMMMMMMMMMk ",
    "  .XMMMMMMMMMMMMMMMMMMMMMMMMK. ",
    "    kMMMMMMMMMMMMMMMMMMMMMMd   ",
    "     ;KMMMMMMMWXXWMMMMMMMk.    ",
    "       .cooc,.    .,coo:.      ",
    "",
}

number and relativenumber sets are lost when opening a file after dashboard

When I use find file or new file, or otherwise start editing a file right after opening nvim into the dashboard, I no longer get line numbers on the left side. However, when I edit a file directly without opening the dashboard, I get line numbers. Expected behaviour: global line number setting is restored upon leaving the dashboard. What can be done to keep line numbers? Thanks in advance.

win10 save/open session error

win10 error ouput:

处理  function sessions#session#session_save 时发生错误

无法打开并写入 “D:/Neovim/session/D:\Neovim\bin\.vim”

session `D:/Ndovim/session/D:\Neovim\bin\.vim` is now persistent

It seems to be caused by the variable file_path in file autoload/sessions/session.vim .

let file_path = g:session_directory.'/'.file_name.'.vim'

I try to reprocess file_name as follow, it looks working.

let file_path = g:session_directory.'/'.split(file_name, '')[-1].'.vim'

E15: Invalid expression: << trim END

I'm using neovim v0.4.4 and use dein.vim to install dashboard-nvim.
When I start neovim I will get output like this:
Error detected while processing /home/ds/.config/nvim/dein/.cache/init.vim/.dein/autoload/dashboard/header.vim: line 694: E15: Invalid expression: << trim END

How to stop the dashboard from setting laststatus = 2 ?

Hi! I do not use any status bar, how can I stop the dashboard from setting laststatus to 2 when leaving the dashboard buffer? I tried autocmd FileType dashboard autocmd WinLeave <buffer> set laststatus=0 but does not work.

pwd is home

When opening recent files, pwd is home (/home/chinmay) instead of the directory of the current file

How to reproduce: Select any file from "recently opened" menu, then do :pwd
Expected: pwd is the directory of the opened file

Add an example of mapping commands with Lua?

I’m new to using neovim/vim and I wanted to try this plugin.

I tried translating the mappings for the built in functionality of the dashboard to lua, but I couldn’t get my mappings to work.

could you create an example of how to map the default commands of the dashboard using Lua?

For more context, I’m using telescope with this dashboard plugin.

打开vim时报错

最近一段时间,当我打开vim的时候会出现这样的error

2021-04-09_14-30

我尝试进行定位后发现可能是这行代码引发的问题

call luaeval("require('dashboard.preview').open_preview")()

代码的位置在autoload/dashboard.vim

请问我该如何解决这个问题

sessionsave only saves one file

I use dein plugin manager. After I load the session, I will open a few files. But when I use the command sessionsave, only one file is saved by the session.

image

How to list session rather autoload latest session?

First of all, thanks for this amazing VIM plugin. It is a simple but crazy useful idea, that brings VIM way closer to being a full IDE.

My only request/question: is there a way to list sessions rather autoload latest session? If I open another file not in session list, a error will return to me shows that can't load the session of this file.

Thanks a lot.

Disabling a few options in the dashboard

These are the defaults of dashboard, personally I don't use change_colorscheme, book_marks, etc.

eg : "SPC mean the leaderkey
let g:dashboard_custom_shortcut={
\ 'last_session'       : 'SPC s l',
\ 'find_history'       : 'SPC f h',
\ 'find_file'          : 'SPC f f',
\ 'new_file'           : 'SPC c n',
\ 'change_colorscheme' : 'SPC t c',
\ 'find_word'          : 'SPC f a',
\ 'book_marks'         : 'SPC f b',
\ }

When I only include the ones that I use, dashboard gives an error. For example if I remove the change_colorscheme line, it gives an error saying Key not present in Dictionary: "change_colorscheme"

Is there a way for me to not include everything?

[feat] add ascii art to wiki

Have a 'neovim' ascii header that I'd like to share!

let g:dashboard_custom_header = [
\ ' ███╗   ██╗ ███████╗ ██████╗  ██╗   ██╗ ██╗ ███╗   ███╗',
\ ' ████╗  ██║ ██╔════╝██╔═══██╗ ██║   ██║ ██║ ████╗ ████║',
\ ' ██╔██╗ ██║ █████╗  ██║   ██║ ██║   ██║ ██║ ██╔████╔██║',
\ ' ██║╚██╗██║ ██╔══╝  ██║   ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║',
\ ' ██║ ╚████║ ███████╗╚██████╔╝  ╚████╔╝  ██║ ██║ ╚═╝ ██║',
\ ' ╚═╝  ╚═══╝ ╚══════╝ ╚═════╝    ╚═══╝   ╚═╝ ╚═╝     ╚═╝',
\]

Dashboard use fzf error

System

  1. macOS Catalina 10.15.6
  2. VIM - Vi IMproved 8.2

Description

I use shortcut keys for Dashboard functions, but when I select an icon and press Enter, an error will be reported;Using clap to use the shortcut key function is fine, but if you press Enter in the second way, it will not report an error, but there will be no query results.

Screenshot

5f5b6d91abed8_5f5b6d92ab925

image

image

image

My Dashboard config

Plug 'glepnir/dashboard-nvim'
Plug 'junegunn/fzf.vim'


" ===
" === FZF
" ===
set rtp+=/usr/local/opt/fzf
noremap <C-p> :Leaderf file<CR>
noremap <C-f> :Ag<CR>
noremap <C-h> :MRU<CR>
noremap <C-t> :BTags<CR>
noremap <C-l> :LinesWithPreview<CR>
noremap <C-w> :Buffers<CR>
"noremap ; :History:<CR>

autocmd! FileType fzf
autocmd  FileType fzf set laststatus=0 noruler
  \| autocmd BufLeave <buffer> set laststatus=2 ruler

command! -bang -nargs=* Buffers
  \ call fzf#vim#buffers(
  \   '',
  \   <bang>0 ? fzf#vim#with_preview('up:60%')
  \           : fzf#vim#with_preview('right:0%', '?'),
  \   <bang>0)


command! -bang -nargs=* LinesWithPreview
    \ call fzf#vim#grep(
    \   'rg --with-filename --column --line-number --no-heading --color=always --smart-case . '.fnameescape(expand('%')), 1,
    \   fzf#vim#with_preview({}, 'up:50%', '?'),
    \   1)

command! -bang -nargs=* Ag
  \ call fzf#vim#ag(
  \   '',
  \   <bang>0 ? fzf#vim#with_preview('up:60%')
  \           : fzf#vim#with_preview('right:50%', '?'),
  \   <bang>0)


command! -bang -nargs=* MRU call fzf#vim#history(fzf#vim#with_preview())

command! -bang BTags
  \ call fzf#vim#buffer_tags('', {
  \     'down': '40%',
  \     'options': '--with-nth 1 
  \                 --reverse 
  \                 --prompt "> " 
  \                 --preview-window="70%" 
  \                 --preview "
  \                     tail -n +\$(echo {3} | tr -d \";\\\"\") {2} |
  \                     head -n 16"'
  \ })

" ===
" === Dashboard
" ===
let g:dashboard_default_executive ='fzf'
let g:mapleader="\<Space>"
let g:indentLine_fileTypeExclude = ['dashboard']
nmap <Leader>ss :<C-u>SessionSave<CR>
nmap <Leader>sl :<C-u>SessionLoad<CR>
nmap <Leader>cn :<C-u>DashboardNewFile<CR>
nnoremap <silent> <Leader>fh :History<CR>
nnoremap <silent> <Leader>ff :Files<CR>
nnoremap <silent> <Leader>tc :Colors<CR>
nnoremap <silent> <Leader>fa :Rg<CR>
nnoremap <silent> <Leader>fb :Marks<CR>
nnoremap <silent> <Leader>cn :<C-u>DashboardNewFile<CR>

let g:dashboard_custom_shortcut={
  \ 'last_session'       : 'SPC s l',
  \ 'find_history'       : 'SPC f h',
  \ 'find_file'          : 'SPC f f',
  \ 'new_file'           : 'SPC c n',
  \ 'change_colorscheme' : 'SPC t c',
  \ 'find_word'          : 'SPC f a',
  \ 'book_marks'         : 'SPC f b',
  \ }

Regression : startup error

After updating to a1a2516, I get

Error detected while processing /home/p00f/.local/share/nvim/site/pack/packer/start/dashboard-nvim/autoload/dashboard/section.vim:
line   37:
E716: Key not present in Dictionary: new_file
Press ENTER or type command to continue
Error detected while processing /home/p00f/.local/share/nvim/site/pack/packer/start/dashboard-nvim/autoload/dashboard/section.vim:
line   37:
E15: Invalid expression: { 'last_session'         :[s:dashboard_shortcut_icon['last_session'].'Recently last session                 '.s:dashboard_shortcut['last_session']], '
find_history'         :[s:dashboard_shortcut_icon['find_history'].'Recently opened files                 '.s:dashboard_shortcut['find_history']], 'find_file'            :[s:da
shboard_shortcut_icon['find_file'].'Find  File                            '.s:dashboard_shortcut['find_file']], 'new_file'             :[s:dashboard_shortcut_icon['new_file'].
'New  File                             '.s:dashboard_shortcut['new_file']], 'change_colorscheme'   :[s:dashboard_shortcut_icon['change_colorscheme'].'Change Colorscheme       
             '.s:dashboard_shortcut['change_colorscheme']], 'find_word'            :[s:dashboard_shortcut_icon['find_word'].'Find  word                            '.s:dashboar
d_shortcut['find_word']], 'book_marks'           :[s:dashboard_shortcut_icon['book_marks'].'Jump to book marks                    '.s:dashboard_short

on startup
Commit 38c1d6a is fine

Make the header to vertical center.

截屏2021-03-09 上午5 33 00

I remove the sessions and footer, so make the dashboard just for watch.

let g:dashboard_custom_footer = []
let g:dashboard_custom_section = {}

It's possible to make the header position to vertical center, then make the cursor invisible.

Error detected while processing /home/kino/.cache/dein/.cache/init.vim/.dein/autoload/dashboard/section.vim: line 37:

Error detected while processing /home/kino/.cache/dein/.cache/init.vim/.dein/autoload/dashboard/section.vim:
line 37:
E716: Key not present in Dictionary: new_file
Press ENTER or type command to continue
Error detected while processing /home/kino/.cache/dein/.cache/init.vim/.dein/autoload/dashboard/section.vim:
line 37:
E15: Invalid expression: { 'last_session' :[s:dashboard_shortcut_icon['last_session'].'Recently last session
'.s:dashboard_shortcut['last_session']], 'find_history' :[s:dashboard_shortcut_icon['find_history'].'Recently opened files
'.s:dashboard_shortcut['find_history']], 'find_file' :[s:dashboard_shortcut_icon['find_file'].'Find File
'.s:dashboard_shortcut['find_file']], 'new_file' :[s:dashboard_shortcut_icon['new_file'].'New F
ile '.s:dashboard_shortcut['new_file']], 'change_colorscheme' :[s:dashboard_shortcut_icon['change_color
scheme'].'Change Colorscheme '.s:dashboard_shortcut['change_colorscheme']], 'find_word' :[s:dashboard_s
hortcut_icon['find_word'].'Find word '.s:dashboard_shortcut['find_word']], 'book_marks' :[s:das
hboard_shortcut_icon['book_marks'].'Jump to book marks '.s:dashboard_short

Plugin loading time

Hey, thanks for making a nice replacement for vim-startify!

I noticed in the default footer you show the amount of plugins being loaded. Will you be able to extend the functionality by putting startup time of the plugins?

Sessions don't work

I run SessionSave can get confirmation that 'is now persistent'. However when I try to load it will say the session loaded, but it will just be a blank page

打开vim时报错

我更新完插件之后打开vim会报这个错

处理 /home/kyle/.config/nvim/plugged/dashboard-nvim/autoload/dashboard/section.vim 时发生错误:
第   45 行:
E716: Dictionary 中不存在键: new_file
请按 ENTER 或其它命令继续
处理 /home/kyle/.config/nvim/plugged/dashboard-nvim/autoload/dashboard/section.vim 时发生错误:
第   45 行:
E15: 无效的表达式: { 'last_session'         :[s:dashboard_shortcut_icon['last_session'].'Recently last session                 '.s:dashboard_shortcut['last_session']], 'fi
nd_history'         :[s:dashboard_shortcut_icon['find_history'].'Recently opened files                 '.s:dashboard_shortcut['find_history']], 'find_file'            :[s:
dashboard_shortcut_icon['find_file'].'Find  File                            '.s:dashboard_shortcut['find_file']], 'new_file'             :[s:dashboard_shortcut_icon['new_f
ile'].'New  File                             '.s:dashboard_shortcut['new_file']], 'change_colorscheme'   :[s:dashboard_shortcut_icon['change_colorscheme'].'Change Colorsch
eme                    '.s:dashboard_shortcut['change_colorscheme']], 'find_word'            :[s:dashboard_shortcut_icon['find_word'].'Find  word
  '.s:dashboard_shortcut['find_word']], 'book_marks'           :[s:dashboard_shortcut_icon['book_marks'].'Jump to book marks                    '.s:dashboard_short
请按 ENTER 或其它命令继续

请问这个该怎么解决?

I made this because I missed vim-startify's quotes

Hey dashboard-nvim is really awesome! I missed vim-startify's random quote every time I opened vim. So I made this, it has 323 programmer quotes (vim-startify is around 146 I think). It's a binary, so it won't effect load time or performance, with releases for linux, mac, and windows.

In case anyone reads this all you have to do to use it is

  • Dowload a release and move the binary into path or build it from source
  • Add the this to either init.vim/.vimrc or after/plugin/dashboard.vim
let q= systemlist('pq')
let g:dashboard_custom_footer = q

many error when open file

firstly I use the vimplug to manage my vim plugs.
and i add
Plug 'hardcoreplayers/dashboard-nvim'
into
~/.vimrc.custom.plug
then i open the file via vim , i meet these error, do you know why.my system is ubuntu-20.04

Error detected while processing /home/meison/.vim/plugged/dashboard-nvim/plugin/dashboard.vim:
line 16:
E117: Unknown function: getenv
E15: Invalid expression: getenv('HOME')
line 17:
E121: Undefined variable: s:home_dir
E116: Invalid arguments for function expand(($XDG_CACHE_HOME ? $XDG_CACHE_HOME : s:home_dir.'/.cache') . '/vim')
E15: Invalid expression: expand(($XDG_CACHE_HOME ? $XDG_CACHE_HOME : s:home_dir.'/.cache') . '/vim')
line 24:
E121: Undefined variable: s:session_path
E116: Invalid arguments for function get(g:, 'dashboard_session_directory', s:session_path.'/session')
E15: Invalid expression: get(g:, 'dashboard_session_directory', s:session_path.'/session')

Tabs don't get loaded when I restore a session

Hello. Thank you for your plugin.

I'm using the LunarVim configuration of neovim. It includes dashboard and barbar. Barbar provides tabs for file navigation. I've noticed that when I load a session the tabs do not show up correctly. This only occurs when loading a session from the Dashboard home screen. If I open up neovim with a new buffer and load a saved session, tabs work as expected. I'm not sure what's different about the home screen vs any other buffer.

My workaround is to

nvim i  #  The file name can be anything since it never gets saved and will be lost immediately when loading a session

Once I've opened neovim without the dashboard home screen, tabs appear correctly in a loaded session.

Custom shortcut icon not working as expected

Hey, there is an issue with the custom shortcut icon

if I set the following in my init.vim

let g:dashboard_custom_shortcut_icon = {}
let g:dashboard_custom_shortcut_icon['last_session'] = '> '
let g:dashboard_custom_shortcut_icon['find_history'] = '> '
let g:dashboard_custom_shortcut_icon['find_file'] = '> '
let g:dashboard_custom_shortcut_icon['new_file'] = '> '
let g:dashboard_custom_shortcut_icon['change_colorscheme'] = '> '
let g:dashboard_custom_shortcut_icon['find_word'] = '> '
let g:dashboard_custom_shortcut_icon['book_marks'] = '> '

it throws the following error

line   23:
E121: Undefined variable: g:dashboard_custom_shortcut

because we are not extending the correct variable in section.vim
I've linked a PR if you want to have a look: #16

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.