From 2ef2c8d8d3aab7079d7d27a134a4fc6ee20fde0c Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 17 Dec 2022 17:56:15 +0300 Subject: feat(nvim): switch alpha to dashboard --- .config/nvim/lua/plugin_settings.lua | 54 +++++++++++++++++++++--------------- .config/nvim/lua/plugins.lua | 7 ++--- 2 files changed, 34 insertions(+), 27 deletions(-) (limited to '.config') diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index 78b0792..6b02db4 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua @@ -246,30 +246,39 @@ require('telescope').setup { require('telescope').load_extension('fzf') -- }}} telescope -- --- alpha-nvim {{{ -- -local alpha = require ("alpha") -local startify = require ("alpha.themes.startify") - --- Set header -startify.section.header.val = { -" ▄ ▄███▄ ████▄ ▄ ▄█ █▀▄▀█ ", -" █ █▀ ▀ █ █ █ ██ █ █ █ ", -"██ █ ██▄▄ █ █ █ █ ██ █ ▄ █ ", -"█ █ █ █▄ ▄▀ ▀████ █ █ ▐█ █ █ ", -"█ █ █ ▀███▀ █ █ ▐ █ ", -"█ ██ █▐ ▀ ", -" ▐ ", +-- dashboard {{{ -- + +local home = os.getenv('HOME') +local db = require('dashboard') +db.custom_header = { + '', + ' ▄ ▄███▄ ████▄ ▄ ▄█ █▀▄▀█ ', + ' █ █▀ ▀ █ █ █ ██ █ █ █ ', + '██ █ ██▄▄ █ █ █ █ ██ █ ▄ █ ', + '█ █ █ █▄ ▄▀ ▀████ █ █ ▐█ █ █ ', + '█ █ █ ▀███▀ █ █ ▐ █ ', + '█ ██ █▐ ▀ ', + ' ▐ ', + '', + '', } - -startify.section.footer = { - { type = "text", val = "footer" }, +db.custom_center = { + { + desc = 'new file ', + action = 'DashboardNewFile', + }, + { + desc = 'find files ', + action = 'Telescope find_files', + }, + { + desc = 'old files', + action = "Telescope oldfiles", + } } +db.custom_footer = { '⛅' } --- Send config to alpha -alpha.setup(startify.opts) - - --- }}} alpha-nvim -- +-- }}} dashboard -- -- treesitter {{{ -- @@ -439,7 +448,6 @@ require('rust-tools').setup(rust_opts) -- }}} rust-tools -- - -- }}} nvim-lsp -- -- vista {{{ -- @@ -453,7 +461,7 @@ require("indent_blankline").setup { show_current_context = true, char = "┊", buftype_exclude = {"terminal"}, - filetype_exclude = {"alpha", "help", "ledger", "man"} + filetype_exclude = {"dashboard", "help", "ledger", "man"} } -- }}} indent-blankline -- diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 427f619..ec03289 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -41,10 +41,7 @@ return require('packer').startup(function(use) } -- dashboard - use { - 'goolord/alpha-nvim', - requires = { 'kyazdani42/nvim-web-devicons' } - } + use 'glepnir/dashboard-nvim' -- completion suite use 'hrsh7th/nvim-cmp' @@ -141,6 +138,8 @@ return require('packer').startup(function(use) -- comment helper use 'numToStr/Comment.nvim' + -- icon pack + use 'kyazdani42/nvim-web-devicons' -- statusline of the $CURRENT_YEAR use { 'nvim-lualine/lualine.nvim', -- cgit v1.2.3-70-g09d2