-
-
Notifications
You must be signed in to change notification settings - Fork 193
/
dashboard.txt
290 lines (226 loc) · 8.69 KB
/
dashboard.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
*dashboard.txt* For Nvim 0.8.0 Last change: 2024 November 02
==============================================================================
Table of Contents *dashboard-table-of-contents*
1. Feature |dashboard-feature|
2. Install |dashboard-install|
3. Configuration |dashboard-configuration|
- Options |dashboard-configuration-options|
- Theme config |dashboard-configuration-theme-config|
4. Backers |dashboard-backers|
5. Donate |dashboard-donate|
6. LICENSE |dashboard-license|
7. Links |dashboard-links|
Fancy and Blazing Fast start screen plugin of neovim ----------------------------------- -----------------------------------
----------------------------------- -----------------------------------
==============================================================================
1. Feature *dashboard-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
==============================================================================
2. Install *dashboard-install*
- Lazy.nvim
>lua
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup {
-- config
}
end,
dependencies = { {'nvim-tree/nvim-web-devicons'}}
}
<
- Packer
>lua
use {
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup {
-- config
}
end,
requires = {'nvim-tree/nvim-web-devicons'}
}
<
==============================================================================
3. Configuration *dashboard-configuration*
OPTIONS *dashboard-configuration-options*
>lua
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'
shuffle_letter -- default is true, shortcut 'letter' will be randomize, set to false to have ordered letter.
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 *dashboard-configuration-theme-config*
the `config` field is used for theme. general field
>lua
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
>lua
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 = { enable = true, limit = 10, icon = 'your icon', label = '', cwd_only = false },
footer = {}, -- footer
}
<
DOOM ~
when use `doom` theme the available options in `config` is
>lua
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 ~
>lua
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 ~
>lua
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
}
})
<
</details
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 <https://github.com/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
==============================================================================
4. Backers *dashboard-backers*
@RakerZh <https://github.com/RakerZh>
==============================================================================
5. Donate *dashboard-donate*
If you’d like to support my work financially, buy me a drink through Github
Sponsor or <https://paypal.me/bobbyhub>
==============================================================================
6. LICENSE *dashboard-license*
MIT
==============================================================================
7. Links *dashboard-links*
1. *@RakerZh*:
2. **: https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl: