added dashboard

This commit is contained in:
Sven Vogel 2024-04-16 14:13:38 +02:00
parent 3d8a4f5b73
commit 5060fc3cb0
6 changed files with 142 additions and 11 deletions

View File

@ -1,5 +1,3 @@
require("bootstrap")
-- load options -- load options
local options = require("options") local options = require("options")
@ -8,6 +6,8 @@ for k, v in pairs(options.vim) do
vim.opt[k] = v vim.opt[k] = v
end end
require("bootstrap")
-- apply color theme -- apply color theme
local status, _ = pcall(vim.cmd, "colorscheme " .. options.ui.theme) local status, _ = pcall(vim.cmd, "colorscheme " .. options.ui.theme)
if not status then if not status then

View File

@ -79,8 +79,14 @@ return {
}, },
{ {
{ "n" }, { "n" },
"<C-w>q", "q",
"<cmd>BufferClose<CR>", "<cmd>BufferClose<CR>",
{ desc = "Quit Buffer" },
},
{
{ "n" },
"<C-w>q",
"<cmd>quit<CR>",
{ desc = "Quit Window" }, { desc = "Quit Window" },
}, },
{ {

94
lua/plugins/dashboard.lua Normal file
View File

@ -0,0 +1,94 @@
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" } },
},
}

View File

@ -12,13 +12,6 @@ return {
}, },
}, },
}, },
{
"echasnovski/mini.animate",
version = false,
config = function(_, opts)
require("mini.pairs").setup(opts)
end,
},
{ {
"echasnovski/mini.pairs", "echasnovski/mini.pairs",
version = false, version = false,

View File

@ -20,6 +20,42 @@ return {
}, },
opts = { opts = {
attach_navic = false, attach_navic = false,
symbols = {
---Modification indicator.
modified = "",
---Truncation indicator.
ellipsis = "...",
---Entry separator.
separator = "",
},
kinds = {
File = "󰈙",
Module = "",
Namespace = "󰌗",
Package = "",
Class = "󰌗",
Method = "󰆧",
Property = "",
Field = "",
Constructor = "",
Enum = "󰕘",
Interface = "󰕘",
Function = "󰊕",
Variable = "󰆧",
Constant = "󰏿",
String = "󰀬",
Number = "󰎠",
Boolean = "",
Array = "󰅪",
Object = "󰅩",
Key = "󰌋",
Null = "󰟢",
EnumMember = "",
Struct = "󰌗",
Event = "",
Operator = "󰆕",
TypeParameter = "󰊄",
},
}, },
}, },
} }

View File

@ -1,6 +1,8 @@
return { return {
{ {
"rcarriga/nvim-notify", "rcarriga/nvim-notify",
opts = {}, opts = {
render = "wrapped-compact",
},
}, },
} }