-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(starter)!:
dashboard.nvim
is now the default starter. To keep …
…using `alpha.nvim`, enable the extra.
- v14.13.0
- v14.12.0
- v14.11.0
- v14.10.0
- v14.9.0
- v14.8.0
- v14.7.0
- v14.6.1
- v14.6.0
- v14.5.0
- v14.4.0
- v14.3.0
- v14.2.0
- v14.1.0
- v14.0.2
- v14.0.1
- v14.0.0
- v13.9.1
- v13.9.0
- v13.8.0
- v13.7.0
- v13.6.0
- v13.5.3
- v13.5.2
- v13.5.1
- v13.5.0
- v13.4.0
- v13.3.1
- v13.3.0
- v13.2.0
- v13.1.0
- v13.0.0
- v12.44.1
- v12.44.0
- v12.43.0
- v12.42.0
- v12.41.0
- v12.40.0
- v12.39.0
- v12.38.2
- v12.38.1
- v12.38.0
- v12.37.0
- v12.36.0
- v12.35.1
- v12.35.0
- v12.34.0
- v12.33.0
- v12.32.0
- v12.31.0
- v12.30.0
- v12.29.2
- v12.29.1
- v12.29.0
- v12.28.0
- v12.27.0
- v12.26.2
- v12.26.1
- v12.26.0
- v12.25.0
- v12.24.0
- v12.23.0
- v12.22.1
- v12.22.0
- v12.21.1
- v12.21.0
- v12.20.1
- v12.20.0
- v12.19.1
- v12.19.0
- v12.18.0
- v12.17.0
- v12.16.0
- v12.15.0
- v12.14.1
- v12.14.0
- v12.13.0
- v12.12.0
- v12.11.0
- v12.10.0
- v12.9.0
- v12.8.0
- v12.7.0
- v12.6.0
- v12.5.0
- v12.4.0
- v12.3.0
- v12.2.0
- v12.1.0
- v12.0.0
- v11.11.0
- v11.10.0
- v11.9.0
- v11.8.0
- v11.7.0
- v11.6.1
- v11.6.0
- v11.5.0
- v11.4.1
- v11.4.0
- v11.3.2
- v11.3.1
- v11.3.0
- v11.2.0
- v11.1.2
- v11.1.1
- v11.1.0
- v11.0.1
- v11.0.0
- v10.25.0
- v10.24.0
- v10.23.0
- v10.22.0
- v10.21.1
- v10.21.0
- v10.20.1
- v10.20.0
- v10.19.0
- v10.18.0
- v10.17.3
- v10.17.2
- v10.17.1
- v10.17.0
- v10.16.0
- v10.15.0
- v10.14.0
- v10.13.0
- v10.12.1
- v10.12.0
- v10.11.1
- v10.11.0
- v10.10.0
- v10.9.1
- v10.9.0
- v10.8.2
- v10.8.1
- v10.8.0
- v10.7.1
- v10.7.0
- v10.6.0
- v10.5.0
- v10.4.4
- v10.4.3
- v10.4.2
- v10.4.1
- v10.4.0
- v10.3.0
- v10.2.0
- v10.1.1
- v10.1.0
- v10.0.1
- v10.0.0
- stable
Showing
4 changed files
with
157 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
return { | ||
|
||
{ "glepnir/dashboard-nvim", enabled = false }, | ||
{ "echasnovski/mini.starter", enabled = false }, | ||
-- Dashboard. This runs when neovim starts, and is what displays | ||
-- the "LAZYVIM" banner. | ||
{ | ||
"goolord/alpha-nvim", | ||
event = "VimEnter", | ||
enabled = true, | ||
init = false, | ||
opts = function() | ||
local dashboard = require("alpha.themes.dashboard") | ||
local logo = [[ | ||
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z | ||
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z | ||
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z | ||
██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z | ||
███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ | ||
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ | ||
]] | ||
|
||
dashboard.section.header.val = vim.split(logo, "\n") | ||
dashboard.section.buttons.val = { | ||
dashboard.button("f", " " .. " Find file", "<cmd> Telescope find_files <cr>"), | ||
dashboard.button("n", " " .. " New file", "<cmd> ene <BAR> startinsert <cr>"), | ||
dashboard.button("r", " " .. " Recent files", "<cmd> Telescope oldfiles <cr>"), | ||
dashboard.button("g", " " .. " Find text", "<cmd> Telescope live_grep <cr>"), | ||
dashboard.button("c", " " .. " Config", "<cmd> e $MYVIMRC <cr>"), | ||
dashboard.button("s", " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]), | ||
dashboard.button("l", " " .. " Lazy", "<cmd> Lazy <cr>"), | ||
dashboard.button("q", " " .. " Quit", "<cmd> qa <cr>"), | ||
} | ||
for _, button in ipairs(dashboard.section.buttons.val) do | ||
button.opts.hl = "AlphaButtons" | ||
button.opts.hl_shortcut = "AlphaShortcut" | ||
end | ||
dashboard.section.header.opts.hl = "AlphaHeader" | ||
dashboard.section.buttons.opts.hl = "AlphaButtons" | ||
dashboard.section.footer.opts.hl = "AlphaFooter" | ||
dashboard.opts.layout[1].val = 8 | ||
return dashboard | ||
end, | ||
config = function(_, dashboard) | ||
-- close Lazy and re-open when the dashboard is ready | ||
if vim.o.filetype == "lazy" then | ||
vim.cmd.close() | ||
vim.api.nvim_create_autocmd("User", { | ||
once = true, | ||
pattern = "AlphaReady", | ||
callback = function() | ||
require("lazy").show() | ||
end, | ||
}) | ||
end | ||
|
||
require("alpha").setup(dashboard.opts) | ||
|
||
vim.api.nvim_create_autocmd("User", { | ||
once = true, | ||
pattern = "LazyVimStarted", | ||
callback = function() | ||
local stats = require("lazy").stats() | ||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) | ||
dashboard.section.footer.val = "⚡ Neovim loaded " | ||
.. stats.loaded | ||
.. "/" | ||
.. stats.count | ||
.. " plugins in " | ||
.. ms | ||
.. "ms" | ||
pcall(vim.cmd.AlphaRedraw) | ||
end, | ||
}) | ||
end, | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters