diff --git a/lua/config/dashboard.lua b/lua/config/dashboard.lua new file mode 100644 index 0000000..9f0af1b --- /dev/null +++ b/lua/config/dashboard.lua @@ -0,0 +1,41 @@ +local autocmd = require 'utils.autocmd' + +vim.g.dashboard_default_executive = 'telescope' + +-- local function split(text) +-- local parts = {} +-- for part in text:gmatch("[^\n]+") do +-- table.insert(parts, part) +-- end +-- return parts +-- end +-- vim.g.dashboard_custom_header = split(vim.fn.system("figlet -m 2 -f slant Neovim")) + +-- vim.g.dashboard_custom_header = { +-- ' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗', +-- ' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║', +-- ' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║', +-- ' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║', +-- ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║', +-- ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝', +-- } + +vim.g.dashboard_custom_header = { + [[ _ __ _ ]], + [[ / | / /___ ____ _ __ (_)____ ___ ]], + [[ / |/ // _ \ / __ \ | / // // __ `__ \]], + [[ / /| // __// /_/ / |/ // // / / / / /]], + [[/_/ |_/ \___/ \____/|___//_//_/ /_/ /_/ ]], +} + +autocmd('dashboard-commands', { + [[FileType dashboard nmap ss :SessionSave]], + [[FileType dashboard nmap sl :SessionLoad]], + [[FileType dashboard nnoremap fh :DashboardFindHistory]], + [[FileType dashboard nnoremap ff :DashboardFindFile]], + [[FileType dashboard nnoremap tc :DashboardChangeColorscheme]], + [[FileType dashboard nnoremap fa :DashboardFindWord]], + [[FileType dashboard nnoremap fb :DashboardJumpMark]], + [[FileType dashboard nnoremap cn :DashboardNewFile]], +}, true) + diff --git a/lua/config/telescope.lua b/lua/config/telescope.lua index c27a32f..14abff3 100644 --- a/lua/config/telescope.lua +++ b/lua/config/telescope.lua @@ -62,6 +62,12 @@ telescope.setup{ pickers = { find_files = { theme = "dropdown", + }, + marks = { + theme = "dropdown", + }, + oldfiles = { + theme = "dropdown", }, git_files = { theme = "dropdown", diff --git a/lua/plugins.lua b/lua/plugins.lua index d6c2569..56bbab8 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -131,6 +131,9 @@ local function usePlugins(use, use_rocks) config = [[require 'config.gitsigns']] -- tag = 'release' -- To use the latest release } + + -- Start screen + use { 'glepnir/dashboard-nvim', config = [[require 'config.dashboard']] } end -- Register custom commands for plugin manager