• Stars
    star
    1,337
  • Rank 34,835 (Top 0.7 %)
  • Language
    Lua
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

vim dashboard

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
{
  'glepnir/dashboard-nvim',
  event = 'VimEnter',
  config = function()
    require('dashboard').setup {
      -- config
    }
  end,
  dependencies = { {'nvim-tree/nvim-web-devicons'}}
}
  • Packer
use {
  'glepnir/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 = '', },
  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',
      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

Highlight

all highlight groups

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

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',
        action = 'lua print(2)'
      },
      {
        icon = '',
        desc = 'Find Dotfiles',
        key = 'f',
        keymap = 'SPC f d',
        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

More Repositories

1

lspsaga.nvim

neovim lsp plugin
Lua
2,484
star
2

nvim-lua-guide-zh

https://github.com/nanotee/nvim-lua-guide chinese version
1,165
star
3

galaxyline.nvim

neovim statusline plugin written in lua
Lua
807
star
4

nvim

neovim configuration written in lua
Lua
726
star
5

dope

a modern structure neovim config template write in lua
Lua
286
star
6

spaceline.vim

vim statusline like spacemacs
Vim Script
279
star
7

zephyr-nvim

A dark neovim colorscheme written in lua
Lua
272
star
8

oceanic-material

Oceanic Material Colorscheme on Vim/NeoVim
Vim Script
174
star
9

indent-guides.nvim

Lua
149
star
10

GoDoc-CN

Go标准库的中文版Dash文档
HTML
133
star
11

jarvim

Generate a module vim configruation like a VIM PRO
Go
112
star
12

leaseapp

go开发的后台API
Go
102
star
13

template.nvim

Quickly insert templates into file
Lua
90
star
14

coman.nvim

neovim plugin for comment and annotation
Lua
57
star
15

prodoc.nvim

a neovim comment and annotation plugin using coroutine
Lua
48
star
16

mcc.nvim

neovim macgic char
Lua
35
star
17

DailyTasks

🌼 A simple go web app without framework
Go
30
star
18

dotfiles

my personal dotfiles on mac or arch
Shell
25
star
19

golang-advance

Go 数据结构与算法 设计模式
Go
23
star
20

mutchar.nvim

a neovim plugin that change type character to other characters accroding rules and filter.
Lua
19
star
21

smartinput.nvim

Lua
15
star
22

hlsearch.nvim

auto remove search highlight and rehighlight when using n or N
Lua
14
star
23

porcelain.nvim

personal colorscheme
Lua
13
star
24

lspmeta.nvim

Go
11
star
25

whiskyline.nvim

whisky line a neovim statusline using coroutine and cache just for fun.
Lua
10
star
26

dashboard-imageview

work for dashboard-nvim
Rust
9
star
27

nerdicons.nvim

get the nerdfont icons inside neovim
Lua
8
star
28

dbsession.nvim

a simple small powerful session for neovim
Lua
8
star
29

go-react-jwt

Golang with React Jwt.
TypeScript
6
star
30

ziglearn-cn

zig programming language tutorial
Zig
6
star
31

glepnir.github.io

Personal Blog
HTML
4
star
32

glepnir

4
star
33

watchdog

Go
3
star
34

fuckcd

2
star
35

GoDDDExample

golang in ddd example
Go
2
star
36

umijs3-crud-example

antd umijs3 crud example
TypeScript
1
star
37

hugo-xshell

HTML
1
star
38

snowflake

Twitter snowflake by go
Go
1
star
39

zapecho

zap logger for echo web framework
Go
1
star