Neovim/lua/plugins/dashboard.lua

95 lines
3.4 KiB
Lua
Raw Normal View History

2024-04-16 12:13:38 +00:00
local logo = [[
__ _ _
/\ \ \_ _| | ____ ___ _(_)_ __ ___
/ \/ / | | | |/ / _` \ \ / / | '_ ` _ \
/ /\ /| |_| | < (_| |\ V /| | | | | | |
\_\ \/ \__,_|_|\_\__,_| \_/ |_|_| |_| |_|
]]
logo = string.rep("\n", 8) .. logo .. "\n\n"
return {
{
"nvimdev/dashboard-nvim",
event = "VimEnter",
config = function()
require("dashboard").setup({
theme = "doom",
shortcut_type = "letter",
hide = {
statusline = true, -- hide statusline default is true
tabline = true, -- hide the tabline
winbar = true, -- hide winbar
},
config = {
header = vim.split(logo, "\n"),
center = {
{
action = "Telescope find_files",
desc = " Find File",
icon = "",
key = "f",
},
{
action = "ene | startinsert",
desc = " New File",
icon = "",
key = "n",
},
{
action = "Telescope oldfiles",
desc = " Recent Files",
icon = "",
key = "r",
},
{
action = "Telescope live_grep",
desc = " Find Text",
icon = "",
key = "g",
},
{
action = [[lua vim.cmd("cd ~/.config/nvim/") vim.cmd("Telescope fd")]],
desc = " Config",
icon = "",
key = "c",
},
{
action = 'lua require("persistence").load()',
desc = " Restore Session",
icon = "",
key = "s",
},
{
action = "Lazy",
desc = " Lazy",
icon = "󰒲 ",
key = "l",
},
{
action = "Mason",
desc = " Language Server & Formatter",
icon = "",
key = "m",
},
{
action = "qa",
desc = " Quit",
icon = "",
key = "q",
},
},
footer = function()
local stats = require("lazy").stats()
return {
"- loaded " .. stats.loaded .. "/" .. stats.count .. " plugins -",
}
end,
},
})
end,
dependencies = { { "nvim-tree/nvim-web-devicons" } },
},
}