1
- vim .g .dashboard_default_executive = " telescope"
2
- vim .g .dashboard_custom_footer = { " https://github.com/nshen/learn-neovim-lua" }
1
+ local status , db = pcall (require , " dashboard" )
2
+ if not status then
3
+ vim .notify (" 没有找到 dashboard" )
4
+ return
5
+ end
3
6
4
- vim .g .dashboard_custom_section = {
5
- a = { description = { " Projects " }, command = " Telescope projects" },
6
- b = { description = { " Recently files " }, command = " Telescope oldfiles" },
7
- c = { description = { " Edit keybindings " }, command = " edit ~/.config/nvim/lua/keybindings.lua" },
8
- d = {
9
- description = { " Edit Projects " },
10
- command = " edit ~/.local/share/nvim/project_nvim/project_history" ,
11
- },
12
- -- e = { description = { " Edit .bashrc " }, command = "edit ~/.bashrc" },
13
- -- f = { description = { " Change colorscheme " }, command = "ChangeColorScheme" },
14
- -- g = { description = { " Edit init.lua " }, command = "edit ~/.config/nvim/init.lua" },
15
- -- h = { description = {' Find file '}, command = 'Telescope find_files'},
16
- -- i = { description = {' Find text '}, command = 'Telescope live_grep'},
7
+ db .custom_footer = {
8
+ " " ,
9
+ " " ,
10
+ " https://github.com/nshen/learn-neovim-lua" ,
17
11
}
18
12
19
- vim .g .dashboard_custom_header = {
13
+ db .custom_center = {
14
+ {
15
+ icon = " " ,
16
+ desc = " Projects " ,
17
+ action = " Telescope projects" ,
18
+ },
19
+ {
20
+ icon = " " ,
21
+ desc = " Recently files " ,
22
+ action = " Telescope oldfiles" ,
23
+ },
24
+ {
25
+ icon = " " ,
26
+ desc = " Edit keybindings " ,
27
+ action = " edit ~/.config/nvim/lua/keybindings.lua" ,
28
+ },
29
+ {
30
+ icon = " " ,
31
+ desc = " Edit Projects " ,
32
+ action = " edit ~/.local/share/nvim/project_nvim/project_history" ,
33
+ },
34
+ -- {
35
+ -- icon = " ",
36
+ -- desc = "Edit .bashrc ",
37
+ -- action = "edit ~/.bashrc",
38
+ -- },
39
+ -- {
40
+ -- icon = " ",
41
+ -- desc = "Change colorscheme ",
42
+ -- action = "ChangeColorScheme",
43
+ -- },
44
+ -- {
45
+ -- icon = " ",
46
+ -- desc = "Edit init.lua ",
47
+ -- action = "edit ~/.config/nvim/init.lua",
48
+ -- },
49
+ -- {
50
+ -- icon = " ",
51
+ -- desc = "Find file ",
52
+ -- action = "Telescope find_files",
53
+ -- },
54
+ -- {
55
+ -- icon = " ",
56
+ -- desc = "Find text ",
57
+ -- action = "Telescopecope live_grep",
58
+ -- },
59
+ }
60
+ db .custom_header = {
61
+ [[ ]] ,
20
62
[[ ███╗ ██╗███████╗██╗ ██╗███████╗███╗ ██╗]] ,
21
63
[[ ████╗ ██║██╔════╝██║ ██║██╔════╝████╗ ██║]] ,
22
64
[[ ██╔██╗ ██║███████╗███████║█████╗ ██╔██╗ ██║]] ,
@@ -25,7 +67,8 @@ vim.g.dashboard_custom_header = {
25
67
[[ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝]] ,
26
68
}
27
69
28
- vim .g .dashboard_custom_header = {
70
+ db .custom_header = {
71
+ [[ ]] ,
29
72
[[ ▀████▀▄▄ ▄█ ]] ,
30
73
[[ █▀ ▀▀▄▄▄▄▄ ▄▄▀▀█ ]] ,
31
74
[[ ▄ █ ▀▀▀▀▄ ▄▀ ]] ,
@@ -37,7 +80,8 @@ vim.g.dashboard_custom_header = {
37
80
[[ █ █ █ ▄▄ ▄▀ ]] ,
38
81
}
39
82
40
- vim .g .dashboard_custom_header = {
83
+ db .custom_header = {
84
+ [[ ]] ,
41
85
[[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗]] ,
42
86
[[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║]] ,
43
87
[[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║]] ,
@@ -48,7 +92,8 @@ vim.g.dashboard_custom_header = {
48
92
[[ [ version : 1.0.0 ] ]] ,
49
93
}
50
94
51
- vim .g .dashboard_custom_header = {
95
+ db .custom_header = {
96
+ [[ ]] ,
52
97
[[ ██╗██╗ ██╗███████╗ ██╗██╗███╗ ██╗ ██████╗███╗ ██╗]] ,
53
98
[[ ██║██║ ██║██╔════╝ ██║██║████╗ ██║ ██╔════╝████╗ ██║]] ,
54
99
[[ ██║██║ ██║█████╗ ██║██║██╔██╗ ██║ ██║ ██╔██╗ ██║]] ,
@@ -59,7 +104,8 @@ vim.g.dashboard_custom_header = {
59
104
[[ [ version : 1.0.0 ] ]] ,
60
105
}
61
106
62
- vim .g .dashboard_custom_header = {
107
+ db .custom_header = {
108
+ [[ ]] ,
63
109
[[ ██╗██╗ ██╗███████╗ ██╗██╗███╗ ██╗]] ,
64
110
[[ ██║██║ ██║██╔════╝ ██║██║████╗ ██║]] ,
65
111
[[ ██║██║ ██║█████╗ ██║██║██╔██╗ ██║]] ,
@@ -68,4 +114,6 @@ vim.g.dashboard_custom_header = {
68
114
[[ ╚════╝ ╚═════╝ ╚══════╝ ╚════╝ ╚═╝╚═╝ ╚═══╝]] ,
69
115
[[ ]] ,
70
116
[[ [ version : 1.0.0 ] ]] ,
117
+ [[ ]] ,
118
+ [[ ]] ,
71
119
}
0 commit comments