summaryrefslogtreecommitdiff
path: root/lua/core/dashboard.lua
diff options
context:
space:
mode:
authorchristianchiarulli <[email protected]>2021-08-29 14:17:32 -0400
committerchristianchiarulli <[email protected]>2021-08-29 14:17:32 -0400
commited5559d259e38a78796a7d81421f02ba6dafac4b (patch)
treeafa9c00c017382bac547265a8a1e16b9770a07eb /lua/core/dashboard.lua
parente7b6d3b6f5982ea1042ffd499a7b85c18f0b782e (diff)
parentc7a5122fe2c14dba0f28f1c077f838f957884afc (diff)
Merge branch 'rolling' of github.com:ChristianChiarulli/LunarVim
Diffstat (limited to 'lua/core/dashboard.lua')
-rw-r--r--lua/core/dashboard.lua42
1 files changed, 21 insertions, 21 deletions
diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua
index d5e5bfe9..a613921f 100644
--- a/lua/core/dashboard.lua
+++ b/lua/core/dashboard.lua
@@ -1,8 +1,13 @@
local M = {}
-M.config = function()
+local home_dir = vim.loop.os_homedir()
+
+M.config = function(config)
lvim.builtin.dashboard = {
active = false,
+ on_config_done = nil,
search_handler = "telescope",
+ disable_at_vim_enter = 0,
+ session_directory = home_dir .. "/.cache/lvim/sessions",
custom_header = {
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
@@ -30,20 +35,20 @@ M.config = function()
command = "Telescope find_files",
},
b = {
+ description = { " Recent Projects " },
+ command = "Telescope projects",
+ },
+ c = {
description = { " Recently Used Files" },
command = "Telescope oldfiles",
},
- -- c = {
- -- description = { " Load Last Session " },
- -- command = "SessionLoad",
- -- },
- c = {
+ d = {
description = { " Find Word " },
command = "Telescope live_grep",
},
- d = {
- description = { " Settings " },
- command = ":e " .. USER_CONFIG_PATH,
+ e = {
+ description = { " Configuration " },
+ command = ":e " .. config.path,
},
},
@@ -52,7 +57,7 @@ M.config = function()
end
M.setup = function()
- vim.g.dashboard_disable_at_vimenter = 0
+ vim.g.dashboard_disable_at_vimenter = lvim.builtin.dashboard.disable_at_vim_enter
vim.g.dashboard_custom_header = lvim.builtin.dashboard.custom_header
@@ -62,12 +67,8 @@ M.setup = function()
lvim.builtin.which_key.mappings[";"] = { "<cmd>Dashboard<CR>", "Dashboard" }
- -- f = {
- -- description = { " Neovim Config Files" },
- -- command = "Telescope find_files cwd=" .. CONFIG_PATH,
- -- },
- -- e = {description = {'ï‚— Marks '}, command = 'Telescope marks'}
- vim.cmd 'let g:dashboard_session_directory = "~/.config/lvim/.sessions"'
+ vim.g.dashboard_session_directory = lvim.builtin.dashboard.session_directory
+
vim.cmd "let packages = len(globpath('~/.local/share/lunarvim/site/pack/packer/start', '*', 0, 1))"
vim.api.nvim_exec(
@@ -77,11 +78,6 @@ M.setup = function()
false
)
- -- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'},
-
- -- vim.g.dashboard_session_directory = CACHE_PATH..'/session'
- -- vim.g.dashboard_custom_footer = lvim.dashboard.footer
-
require("core.autocmds").define_augroups {
_dashboard = {
-- seems to be nobuflisted that makes my stuff disappear will do more testing
@@ -98,6 +94,10 @@ M.setup = function()
{ "FileType", "dashboard", "nnoremap <silent> <buffer> q :q<CR>" },
},
}
+
+ if lvim.builtin.dashboard.on_config_done then
+ lvim.builtin.dashboard.on_config_done()
+ end
end
return M