mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
* Neovim: Backup original LazyVim setup to .config/nvim.lazy.d * Neovim: Currently done with basic completions and LSP * Git: Always use ssh to connect github remote * Zsh: Add more antidots config
59 lines
3.1 KiB
Lua
59 lines
3.1 KiB
Lua
-- alpha-nvim.lua
|
|
return {
|
|
{
|
|
'goolord/alpha-nvim',
|
|
dependencies = {
|
|
-- 'echasnovski/mini.icons',
|
|
-- 'nvim-lua/plenary.nvim'
|
|
},
|
|
config = function ()
|
|
local alpha = require'alpha'
|
|
local dashboard = require'alpha.themes.dashboard'
|
|
dashboard.section.header.val = {
|
|
" ",
|
|
"================= =============== =============== ======== ========",
|
|
"\\\\ . . . . . . .\\\\ //. . . . . . .\\\\ //. . . . . . .\\\\ \\\\. . .\\\\// . . //",
|
|
"||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\\/ . . .||",
|
|
"|| . .|| ||. . || || . .|| ||. . || || . .|| ||. . || ||. . . . . . . ||",
|
|
"||. . || || . .|| ||. . || || . .|| ||. . || || . .|| || . | . . . . .||",
|
|
"|| . .|| ||. _-|| ||-_ .|| ||. . || || . .|| ||. _-|| ||-_.|\\ . . . . ||",
|
|
"||. . || ||-' || || `-|| || . .|| ||. . || ||-' || || `|\\_ . .|. .||",
|
|
"|| . _|| || || || || ||_ . || || . _|| || || || |\\ `-_/| . ||",
|
|
"||_-' || .|/ || || \\|. || `-_|| ||_-' || .|/ || || | \\ / |-_.||",
|
|
"|| ||_-' || || `-_|| || || ||_-' || || | \\ / | `||",
|
|
"|| `' || || `' || || `' || || | \\ / | ||",
|
|
"|| .===' `===. .==='.`===. .===' /==. | \\/ | ||",
|
|
"|| .==' \\_|-_ `===. .===' _|_ `===. .===' _-|/ `== \\/ | ||",
|
|
"|| .==' _-' `-_ `=' _-' `-_ `=' _-' `-_ /| \\/ | ||",
|
|
"|| .==' _-' `-__\\._-' `-_./__-' `' |. /| | ||",
|
|
"||.==' _-' `' | /==.||",
|
|
"==' _-' j s 0 n y N E O V I M \\/ `==",
|
|
"\\ _-' `-_ /",
|
|
" `'' ``' ",
|
|
}
|
|
dashboard.section.buttons.val.leader = "SPC"
|
|
dashboard.section.buttons.val = {
|
|
-- leader = "SPC",
|
|
dashboard.button('c', ' 新建文件', ':enew<CR>'),
|
|
dashboard.button('SPC f f', ' 查找文件', ':Telescope find_files<CR>'),
|
|
dashboard.button('SPC f h', ' 历史文件', ':Telescope oldfiles<CR>'),
|
|
dashboard.button('SPC s l', ' 加载会话', ':SessionSearch<CR>'), -- 加载会话
|
|
dashboard.button('SPC q', ' 退出', ':qa<CR>'),
|
|
}
|
|
local handle = io.popen('fortune')
|
|
--- Handle the case where fortune is not installed
|
|
local fortune = ""
|
|
if handle then
|
|
fortune = handle:read("*a")
|
|
handle:close()
|
|
end
|
|
dashboard.section.footer.val = "今日 " .. os.date("%Y-%m-%d %A") .. " " .. fortune
|
|
|
|
dashboard.config.opts.noautocmd = true
|
|
|
|
-- vim.cmd[[autocmd User AlphaReady echo 'Alpha ready!']]
|
|
|
|
alpha.setup(dashboard.config)
|
|
end
|
|
};
|
|
}
|