- Plugins are now properly organized into separate folders. - General configurations are also now organized by category into folders. - Now using lazyvim-defined plugins whenever possible for a more consistent and clean experience. - Duplicate manual plugin definitions were removed. - Extensive testing has been performed to ensure config works on fresh installs and a variety of systems. - Further slimming of manual plugins and an updated dependency list is forthcoming.
97 lines
7.0 KiB
Lua
97 lines
7.0 KiB
Lua
|
|
return {
|
|
"nvimdev/dashboard-nvim",
|
|
lazy = false,
|
|
opts = function()
|
|
-- if line length is greater than 80, use fancy mode
|
|
if vim.fn.winwidth(0) >= 100 then
|
|
LOGO = [[
|
|
██████╗ ██████╗ ██████╗ ████████╗██╗███████╗███████╗████████╗ ███╗ ██╗██╗ ██╗██╗███╗ ███╗
|
|
██╔══██╗██╔═══██╗██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝╚══██╔══╝ ████╗ ██║██║ ██║██║████╗ ████║
|
|
██████╔╝██║ ██║██║ ██║ ██║ ██║█████╗ ███████╗ ██║ ██╔██╗ ██║██║ ██║██║██╔████╔██║
|
|
██╔══██╗██║ ██║██║ ██║ ██║ ██║██╔══╝ ╚════██║ ██║ ██║╚██╗██║╚██╗ ██╔╝██║██║╚██╔╝██║
|
|
██║ ██║╚██████╔╝╚██████╔╝ ██║ ██║███████╗███████║ ██║ ██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
|
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
|
]]
|
|
elseif vim.fn.winwidth(0) >= 80 then
|
|
LOGO = [[
|
|
███████████ █████ ███ █████
|
|
░░███░░░░░███ ░░███ ░░░ ░░███
|
|
░███ ░███ ██████ ██████ ███████ ████ ██████ █████ ███████
|
|
░██████████ ███░░███ ███░░███░░░███░ ░░███ ███░░███ ███░░ ░░░███░
|
|
░███░░░░░███ ░███ ░███░███ ░███ ░███ ░███ ░███████ ░░█████ ░███
|
|
░███ ░███ ░███ ░███░███ ░███ ░███ ███ ░███ ░███░░░ ░░░░███ ░███ ███
|
|
█████ █████░░██████ ░░██████ ░░█████ █████░░██████ ██████ ░░█████
|
|
░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░
|
|
██████ █████ █████ █████ ███
|
|
░░██████ ░░███ ░░███ ░░███ ░░░
|
|
░███░███ ░███ ░███ ░███ ████ █████████████
|
|
░███░░███░███ ░███ ░███ ░░███ ░░███░░███░░███
|
|
░███ ░░██████ ░░███ ███ ░███ ░███ ░███ ░███
|
|
░███ ░░█████ ░░░█████░ ░███ ░███ ░███ ░███
|
|
█████ ░░█████ ░░███ █████ █████░███ █████
|
|
░░░░░ ░░░░░ ░░░ ░░░░░ ░░░░░ ░░░ ░░░░░
|
|
|
|
]]
|
|
else
|
|
LOGO = [[
|
|
░█▀▄░█▀█░█▀█░▀█▀░▀█▀░█▀▀░█▀▀░▀█▀░░░█▀█░█░█░▀█▀░█▄█
|
|
░█▀▄░█░█░█░█░░█░░░█░░█▀▀░▀▀█░░█░░░░█░█░▀▄▀░░█░░█░█
|
|
░▀░▀░▀▀▀░▀▀▀░░▀░░▀▀▀░▀▀▀░▀▀▀░░▀░░░░▀░▀░░▀░░▀▀▀░▀░▀
|
|
]]
|
|
end
|
|
LOGO = string.rep("\n", 8) .. LOGO .. "\n\n"
|
|
local opts = {
|
|
theme = "doom",
|
|
hide = {
|
|
statusline = false,
|
|
},
|
|
config = {
|
|
header = vim.split(LOGO, "\n"),
|
|
-- stylua: ignore
|
|
center = {
|
|
{ action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" },
|
|
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
|
{ action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" },
|
|
{ action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = " ", key = "g" },
|
|
{ action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = " ", key = "c" },
|
|
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
|
{ action = 'RemoteStart', desc = " Remote Session", icon = " ", key = "v" },
|
|
{ action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
|
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
|
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
|
|
},
|
|
footer = function()
|
|
local stats = require("lazy").stats()
|
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
|
return {
|
|
"⚡ Neovim loaded "
|
|
.. stats.loaded
|
|
.. "/"
|
|
.. stats.count
|
|
.. " plugins in "
|
|
.. ms
|
|
.. "ms",
|
|
}
|
|
end,
|
|
},
|
|
}
|
|
for _, button in ipairs(opts.config.center) do
|
|
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
|
button.key_format = " %s"
|
|
end
|
|
-- open dashboard after closing lazy
|
|
if vim.o.filetype == "lazy" then
|
|
vim.api.nvim_create_autocmd("WinClosed", {
|
|
pattern = tostring(vim.api.nvim_get_current_win()),
|
|
once = true,
|
|
callback = function()
|
|
vim.schedule(function()
|
|
vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
|
|
end)
|
|
end,
|
|
})
|
|
end
|
|
return opts
|
|
end,
|
|
} |