summaryrefslogtreecommitdiff
path: root/lua/config/dashboard.lua
blob: 67caabfd524a10ef65e6ba6383c1b48d8492c57d (plain)
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
return function()
local db = require("dashboard")

-- Fortune quote (supports multiline)
local function quote()
	local handle = io.popen("fortune -s")
	local result = handle:read("*a")
	handle:close()
	local lines = { "" }
	for line in result:gmatch("[^\r\n]+") do
		table.insert(lines, line)
	end
	table.insert(lines, "")
	return lines
end

db.setup {
	theme = "hyper",
	config = {
		week_header = {
			enable = false  -- or true if you want date/time header
		},
		header = {
			"│  ╲   │ │",
			"│   ╲  │ │",
			"│ │╲ ╲ │ │",
			"│ │ ╲ ╲│ │",
			"│ │  ╲   │",
			"│ │   ╲  │",
			"                                                  ",
			"Neovim " .. vim.version().major .. '.' .. vim.version().minor .. '.' .. vim.version().patch,
			"   " .. os.date("%A, %B %d, %Y"),  -- your custom date/day line
			"",
			"[TIP: To exit Vim, use a Sledgehammer!]",
			""
		},
		shortcut = {
			{
				icon = " ",
				desc = "New File",
				key  = "n",
				action = "enew"
			},
			{
				icon = " ",
				desc = "Find File",
				key  = "f",
				action = "Telescope find_files"
			},
			{
				icon = " ",
				desc = "Recent Files",
				key  = "r",
				action = "Telescope oldfiles"
			},
			{
				icon = "󰓢 ",
				desc = "Open Config",
				key  = "c",
				action = "edit ~/.config/nvim/"
			},
			{
				icon = "󰣪 ",
				desc = "SLEDGEHAMMER!",
				action = "qa"
			},
		},
		packages = {
			enable = true  -- set to true if you want plugin count display
		},
		mru = {
			enable = true,  -- set true if you want MRU files
			limit  = 10,
			icon   = " ",
			label  = "Recent",
			cwd_only = false
		},
		project = {
			enable = false,  -- set true if you want project list
			limit  = 8,
			icon   = " ",
			label  = "Projects",
			action = "Telescope find_files cwd="
		},
		footer = quote(),
	},
}
end