1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00
jdhao-nvim-config/lua/config/dashboard-nvim.lua
jdhao e2f348cb37 fix: missing nerdfonts
Since wezterm upgrade its support for Nerd Fonts 3.0, we should update
the codepoints used for some of the Unicode Icons. Their code points are
changed due to breaking changes in Nerd Fonts.
2023-07-25 22:53:20 +02:00

76 lines
2.7 KiB
Lua

local api = vim.api
local keymap = vim.keymap
local dashboard = require("dashboard")
conf = {}
conf.header = {
" ",
" ",
" ",
" ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗",
" ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║",
" ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║",
" ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║",
" ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║",
" ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝",
" ",
" ",
" ",
" ",
}
conf.center = {
{
icon = "󰈞 ",
desc = "Find File ",
action = "Leaderf file --popup",
key = "<Leader> f f",
},
{
icon = "󰈢 ",
desc = "Recently opened files ",
action = "Leaderf mru --popup",
key = "<Leader> f r",
},
{
icon = "󰈬 ",
desc = "Project grep ",
action = "Leaderf rg --popup",
key = "<Leader> f g",
},
{
icon = "",
desc = "Open Nvim config ",
action = "tabnew $MYVIMRC | tcd %:p:h",
key = "<Leader> e v",
},
{
icon = "",
desc = "New file ",
action = "enew",
key = "e",
},
{
icon = "󰗼 ",
desc = "Quit Nvim ",
-- desc = "Quit Nvim ",
action = "qa",
key = "q",
},
}
dashboard.setup({
theme = 'doom',
shortcut_type = 'number',
config = conf
})
api.nvim_create_autocmd("FileType", {
pattern = "dashboard",
group = api.nvim_create_augroup("dashboard_enter", { clear = true }),
callback = function ()
keymap.set("n", "q", ":qa<CR>", { buffer = true, silent = true })
keymap.set("n", "e", ":enew<CR>", { buffer = true, silent = true })
end
})