2021-07-13 03:11:43 +02:00
|
|
|
local M = {}
|
|
|
|
M.config = function()
|
2021-07-25 03:17:11 +02:00
|
|
|
lvim.builtin.dashboard = {
|
2021-07-13 03:11:43 +02:00
|
|
|
active = false,
|
|
|
|
search_handler = "telescope",
|
2021-08-17 17:20:18 +02:00
|
|
|
disable_at_vim_enter = 0,
|
|
|
|
session_directory = os.getenv "HOME" .. "/.cache/lvim/sessions",
|
2021-07-13 03:11:43 +02:00
|
|
|
custom_header = {
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
" ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
|
|
"⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤",
|
|
|
|
"⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿",
|
|
|
|
"⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏",
|
|
|
|
"⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃",
|
|
|
|
"⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀",
|
|
|
|
},
|
|
|
|
|
|
|
|
custom_section = {
|
|
|
|
a = {
|
|
|
|
description = { " Find File " },
|
|
|
|
command = "Telescope find_files",
|
|
|
|
},
|
2021-08-22 08:35:50 +02:00
|
|
|
b = {
|
|
|
|
description = { " Recent Projects " },
|
|
|
|
command = "Telescope projects",
|
|
|
|
},
|
2021-08-18 07:34:26 +02:00
|
|
|
c = {
|
2021-07-13 03:11:43 +02:00
|
|
|
description = { " Recently Used Files" },
|
|
|
|
command = "Telescope oldfiles",
|
|
|
|
},
|
2021-08-18 07:34:26 +02:00
|
|
|
d = {
|
2021-07-13 03:11:43 +02:00
|
|
|
description = { " Find Word " },
|
|
|
|
command = "Telescope live_grep",
|
|
|
|
},
|
2021-08-18 07:34:26 +02:00
|
|
|
e = {
|
2021-08-19 13:44:21 +02:00
|
|
|
description = { " Configuration " },
|
2021-07-31 20:28:59 +02:00
|
|
|
command = ":e " .. USER_CONFIG_PATH,
|
2021-07-13 03:11:43 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2021-08-04 21:20:09 +02:00
|
|
|
footer = { "lunarvim.org" },
|
2021-07-13 03:11:43 +02:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
M.setup = function()
|
2021-08-17 17:20:18 +02:00
|
|
|
vim.g.dashboard_disable_at_vimenter = lvim.builtin.dashboard.disable_at_vim_enter
|
2021-07-13 03:11:43 +02:00
|
|
|
|
2021-07-25 03:17:11 +02:00
|
|
|
vim.g.dashboard_custom_header = lvim.builtin.dashboard.custom_header
|
2021-07-13 03:11:43 +02:00
|
|
|
|
2021-07-25 03:17:11 +02:00
|
|
|
vim.g.dashboard_default_executive = lvim.builtin.dashboard.search_handler
|
2021-07-13 03:11:43 +02:00
|
|
|
|
2021-07-25 03:17:11 +02:00
|
|
|
vim.g.dashboard_custom_section = lvim.builtin.dashboard.custom_section
|
2021-07-13 03:11:43 +02:00
|
|
|
|
2021-07-25 03:17:11 +02:00
|
|
|
lvim.builtin.which_key.mappings[";"] = { "<cmd>Dashboard<CR>", "Dashboard" }
|
2021-07-14 06:45:11 +02:00
|
|
|
|
2021-08-17 17:20:18 +02:00
|
|
|
vim.g.dashboard_session_directory = lvim.builtin.dashboard.session_directory
|
|
|
|
|
2021-07-20 04:50:07 +02:00
|
|
|
vim.cmd "let packages = len(globpath('~/.local/share/lunarvim/site/pack/packer/start', '*', 0, 1))"
|
2021-07-13 03:11:43 +02:00
|
|
|
|
|
|
|
vim.api.nvim_exec(
|
|
|
|
[[
|
2021-08-07 11:23:25 +02:00
|
|
|
let g:dashboard_custom_footer = ['LunarVim loaded '..packages..' plugins ']
|
2021-07-13 03:11:43 +02:00
|
|
|
]],
|
|
|
|
false
|
|
|
|
)
|
|
|
|
|
2021-07-25 13:55:19 +02:00
|
|
|
require("core.autocmds").define_augroups {
|
2021-07-13 03:11:43 +02:00
|
|
|
_dashboard = {
|
2021-08-06 13:20:25 +02:00
|
|
|
-- seems to be nobuflisted that makes my stuff disappear will do more testing
|
2021-07-13 03:11:43 +02:00
|
|
|
{
|
|
|
|
"FileType",
|
|
|
|
"dashboard",
|
|
|
|
"setlocal nocursorline noswapfile synmaxcol& signcolumn=no norelativenumber nocursorcolumn nospell nolist nonumber bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= ",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"FileType",
|
|
|
|
"dashboard",
|
2021-07-25 03:17:11 +02:00
|
|
|
"set showtabline=0 | autocmd BufLeave <buffer> set showtabline=" .. vim.opt.showtabline._value,
|
2021-07-13 03:11:43 +02:00
|
|
|
},
|
|
|
|
{ "FileType", "dashboard", "nnoremap <silent> <buffer> q :q<CR>" },
|
|
|
|
},
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|