2022-12-30 17:30:52 +01:00
|
|
|
return {
|
|
|
|
-- better vim.notify
|
|
|
|
{
|
|
|
|
"rcarriga/nvim-notify",
|
2022-12-30 23:33:57 +01:00
|
|
|
init = function()
|
|
|
|
vim.notify = function(...)
|
|
|
|
vim.notify = require("notify")
|
|
|
|
return vim.notify(...)
|
|
|
|
end
|
2022-12-30 17:30:52 +01:00
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- better vim.ui
|
|
|
|
{
|
|
|
|
"stevearc/dressing.nvim",
|
|
|
|
event = "VeryLazy",
|
|
|
|
config = true,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- bufferline
|
|
|
|
{
|
|
|
|
"akinsho/nvim-bufferline.lua",
|
|
|
|
event = "BufAdd",
|
|
|
|
config = true,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- statusline
|
|
|
|
{
|
|
|
|
"nvim-lualine/lualine.nvim",
|
|
|
|
event = "VeryLazy",
|
2022-12-30 18:21:12 +01:00
|
|
|
config = {
|
|
|
|
options = {
|
|
|
|
globalstatus = true,
|
|
|
|
},
|
|
|
|
},
|
2022-12-30 17:30:52 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
-- indent guides for Neovim
|
|
|
|
{
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
event = "BufReadPre",
|
|
|
|
config = {
|
|
|
|
char = "▏",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
-- dashboard
|
|
|
|
{
|
|
|
|
"goolord/alpha-nvim",
|
|
|
|
lazy = false,
|
|
|
|
config = function()
|
|
|
|
local dashboard = require("alpha.themes.dashboard")
|
|
|
|
local logo = [[
|
|
|
|
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
|
|
|
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
|
|
|
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
|
|
|
██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
|
|
|
███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
|
|
|
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
2022-12-30 23:34:17 +01:00
|
|
|
]]
|
2022-12-30 17:30:52 +01:00
|
|
|
|
|
|
|
dashboard.section.header.val = vim.split(logo, "\n")
|
|
|
|
dashboard.section.buttons.val = {
|
|
|
|
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
|
|
|
|
dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
|
|
|
|
dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
|
|
|
|
dashboard.button("g", " " .. " Find text", ":Telescope live_grep <CR>"),
|
|
|
|
dashboard.button("c", " " .. " Config", ":e $MYVIMRC <CR>"),
|
|
|
|
dashboard.button("q", " " .. " Quit", ":qa<CR>"),
|
|
|
|
}
|
2022-12-30 23:34:17 +01:00
|
|
|
for _, button in ipairs(dashboard.section.buttons.val) do
|
|
|
|
button.opts.hl = "AlphaButtons"
|
|
|
|
button.opts.hl_shortcut = "AlphaShortcut"
|
|
|
|
end
|
|
|
|
dashboard.section.footer.opts.hl = "AlphaFooter"
|
|
|
|
dashboard.section.header.opts.hl = "AlphaHeader"
|
|
|
|
dashboard.section.buttons.opts.hl = "AlphaButtons"
|
|
|
|
dashboard.opts.layout[1].val = 8
|
|
|
|
|
|
|
|
if vim.bo[0].filetype == "lazy" then
|
|
|
|
vim.notify("Missing plugins installed!", vim.log.levels.INFO, { title = "LazyVim" })
|
|
|
|
vim.cmd.close()
|
|
|
|
end
|
2022-12-30 17:30:52 +01:00
|
|
|
|
|
|
|
require("alpha").setup(dashboard.opts)
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd("User", {
|
|
|
|
pattern = "LazyVimStarted",
|
|
|
|
callback = function()
|
|
|
|
local stats = require("lazy").stats()
|
|
|
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
2022-12-30 23:34:17 +01:00
|
|
|
dashboard.section.footer.val = "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
|
2022-12-30 17:30:52 +01:00
|
|
|
pcall(vim.cmd.AlphaRedraw)
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
}
|