Dot_Files/.config/nvim/lua/plugins/configs/dashboard-nvim.lua

41 lines
2.0 KiB
Lua
Raw Normal View History

2022-01-10 09:55:15 -06:00
local g = vim.g
local fn = vim.fn
2022-05-11 21:00:57 -05:00
local plugins_count = fn.len(fn.globpath('~/.local/share/nvim/site/pack/packer/start', '*', 0, 1))
2022-01-10 09:55:15 -06:00
g.dashboard_disable_statusline = 1
2022-05-11 21:00:57 -05:00
g.dashboard_default_executive = 'telescope'
2022-01-10 09:55:15 -06:00
g.dashboard_custom_header = {
2022-05-11 21:00:57 -05:00
' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗',
' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║',
' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║',
' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║',
' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║',
' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝',
2022-01-10 09:55:15 -06:00
}
g.dashboard_custom_section = {
2022-05-11 21:00:57 -05:00
a = { description = { ' Find File SPC t f' }, command = 'Telescope find_files' },
b = { description = { ' Find directory SPC t d' }, command = 'Telescope find_directories' },
c = { description = { ' Recents SPC t o' }, command = 'Telescope oldfiles' },
d = { description = { ' Find Word SPC t w' }, command = 'Telescope live_grep' },
2022-01-10 09:55:15 -06:00
}
g.dashboard_custom_footer = {
2022-05-11 21:00:57 -05:00
'Loaded ' .. plugins_count .. ' plugins!  ',
2022-01-10 09:55:15 -06:00
}
-- Disable statusline and cursorline in dashboard.
2022-05-11 21:00:57 -05:00
vim.api.nvim_create_autocmd('BufEnter', {
callback = function()
if vim.bo.filetype == 'dashboard' then
vim.opt.laststatus = 0
2022-03-18 06:29:56 -05:00
vim.opt.cursorline = false
else
vim.opt.laststatus = 3
2022-03-18 06:29:56 -05:00
vim.opt.cursorline = true
end
2022-05-11 21:00:57 -05:00
end,
})