|
1 | 1 | return {
|
2 |
| - "nvimdev/dashboard-nvim", |
3 |
| - event = "VimEnter", |
4 |
| - opts = function() |
5 |
| - local logo = [[ |
6 |
| -████████╗███████╗ ██████╗██╗ ██╗██████╗ ██╗ ██╗███████╗██╗ ██╗███████╗ |
7 |
| -╚══██╔══╝██╔════╝██╔════╝██║ ██║██╔══██╗██║ ██║██╔════╝██║ ██║██╔════╝ |
8 |
| - ██║ █████╗ ██║ ███████║██║ ██║██║ ██║█████╗ ██║ ██║███████╗ |
9 |
| - ██║ ██╔══╝ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝ ██║ ██║╚════██║ |
10 |
| - ██║ ███████╗╚██████╗██║ ██║██████╔╝╚██████╔╝██║ ╚██████╔╝███████║ |
11 |
| - ╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝ |
12 |
| - ]] |
13 |
| - |
14 |
| - logo = string.rep("\n", 8) .. logo .. "\n\n" |
15 |
| - |
16 |
| - local opts = { |
17 |
| - theme = "doom", |
18 |
| - hide = { |
19 |
| - -- this is taken care of by lualine |
20 |
| - -- enabling this messes up the actual laststatus setting after loading a file |
21 |
| - statusline = false, |
22 |
| - }, |
23 |
| - config = { |
24 |
| - header = vim.split(logo, "\n"), |
25 |
| - -- stylua: ignore |
26 |
| - center = { |
27 |
| - { action = "Telescope find_files", desc = " Find file", icon = " ", key = "f" }, |
28 |
| - { action = "ene | startinsert", desc = " New file", icon = " ", key = "n" }, |
29 |
| - { action = "Telescope oldfiles", desc = " Recent files", icon = " ", key = "r" }, |
30 |
| - { action = "Telescope live_grep", desc = " Find text", icon = " ", key = "g" }, |
31 |
| - -- { action = [[lua require("lazyvim.util").telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, |
32 |
| - -- { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, |
33 |
| - -- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, |
34 |
| - { action = "Lazy", desc = " Lazy", icon = " ", key = "l" }, |
35 |
| - { action = "qa", desc = " Quit", icon = " ", key = "q" }, |
36 |
| - }, |
37 |
| - footer = function() |
38 |
| - local stats = require("lazy").stats() |
39 |
| - local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) |
40 |
| - return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } |
41 |
| - end, |
42 |
| - }, |
43 |
| - } |
44 |
| - |
45 |
| - for _, button in ipairs(opts.config.center) do |
46 |
| - button.desc = button.desc .. string.rep(" ", 43 - #button.desc) |
47 |
| - button.key_format = " %s" |
48 |
| - end |
49 |
| - |
50 |
| - -- close Lazy and re-open when the dashboard is ready |
51 |
| - if vim.o.filetype == "lazy" then |
52 |
| - vim.cmd.close() |
53 |
| - vim.api.nvim_create_autocmd("User", { |
54 |
| - pattern = "DashboardLoaded", |
55 |
| - callback = function() |
56 |
| - require("lazy").show() |
57 |
| - end, |
58 |
| - }) |
59 |
| - end |
60 |
| - |
61 |
| - return opts |
62 |
| - end, |
| 2 | +-- "nvimdev/dashboard-nvim", |
| 3 | +-- event = "VimEnter", |
| 4 | +-- opts = function() |
| 5 | +-- local logo = [[ |
| 6 | +-- ████████╗███████╗ ██████╗██╗ ██╗██████╗ ██╗ ██╗███████╗██╗ ██╗███████╗ |
| 7 | +-- ╚══██╔══╝██╔════╝██╔════╝██║ ██║██╔══██╗██║ ██║██╔════╝██║ ██║██╔════╝ |
| 8 | +-- ██║ █████╗ ██║ ███████║██║ ██║██║ ██║█████╗ ██║ ██║███████╗ |
| 9 | +-- ██║ ██╔══╝ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝ ██║ ██║╚════██║ |
| 10 | +-- ██║ ███████╗╚██████╗██║ ██║██████╔╝╚██████╔╝██║ ╚██████╔╝███████║ |
| 11 | +-- ╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝ |
| 12 | +-- ]] |
| 13 | +-- |
| 14 | +-- logo = string.rep("\n", 8) .. logo .. "\n\n" |
| 15 | +-- |
| 16 | +-- local opts = { |
| 17 | +-- theme = "doom", |
| 18 | +-- hide = { |
| 19 | +-- -- this is taken care of by lualine |
| 20 | +-- -- enabling this messes up the actual laststatus setting after loading a file |
| 21 | +-- statusline = false, |
| 22 | +-- }, |
| 23 | +-- config = { |
| 24 | +-- header = vim.split(logo, "\n"), |
| 25 | +-- -- stylua: ignore |
| 26 | +-- center = { |
| 27 | +-- { action = "Telescope find_files", desc = " Find file", icon = " ", key = "f" }, |
| 28 | +-- { action = "ene | startinsert", desc = " New file", icon = " ", key = "n" }, |
| 29 | +-- { action = "Telescope oldfiles", desc = " Recent files", icon = " ", key = "r" }, |
| 30 | +-- { action = "Telescope live_grep", desc = " Find text", icon = " ", key = "g" }, |
| 31 | +-- -- { action = [[lua require("lazyvim.util").telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, |
| 32 | +-- -- { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, |
| 33 | +-- -- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, |
| 34 | +-- { action = "Lazy", desc = " Lazy", icon = " ", key = "l" }, |
| 35 | +-- { action = "qa", desc = " Quit", icon = " ", key = "q" }, |
| 36 | +-- }, |
| 37 | +-- footer = function() |
| 38 | +-- local stats = require("lazy").stats() |
| 39 | +-- local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) |
| 40 | +-- return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } |
| 41 | +-- end, |
| 42 | +-- }, |
| 43 | +-- } |
| 44 | +-- |
| 45 | +-- for _, button in ipairs(opts.config.center) do |
| 46 | +-- button.desc = button.desc .. string.rep(" ", 43 - #button.desc) |
| 47 | +-- button.key_format = " %s" |
| 48 | +-- end |
| 49 | +-- |
| 50 | +-- -- close Lazy and re-open when the dashboard is ready |
| 51 | +-- if vim.o.filetype == "lazy" then |
| 52 | +-- vim.cmd.close() |
| 53 | +-- vim.api.nvim_create_autocmd("User", { |
| 54 | +-- pattern = "DashboardLoaded", |
| 55 | +-- callback = function() |
| 56 | +-- require("lazy").show() |
| 57 | +-- end, |
| 58 | +-- }) |
| 59 | +-- end |
| 60 | +-- |
| 61 | +-- return opts |
| 62 | +-- end, |
63 | 63 | }
|
0 commit comments