diff options
Diffstat (limited to 'neovim/lua/plugins/dashboard.lua')
-rw-r--r-- | neovim/lua/plugins/dashboard.lua | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/neovim/lua/plugins/dashboard.lua b/neovim/lua/plugins/dashboard.lua new file mode 100644 index 0000000..0e719c7 --- /dev/null +++ b/neovim/lua/plugins/dashboard.lua @@ -0,0 +1,58 @@ +local alpha = require('alpha') +local dashboard = require('alpha.themes.dashboard') + +local header = { + type = 'text', + val = 'Neovim', + opts = { + position = 'center', + } +} + +local buttons = { + type = 'group', + val = { + { + type = 'text', + val = 'Quick actions', + opts = { position = 'center' } + }, + { + type = 'padding', + val = 1, + }, + dashboard.button('<leader>n', ' New File', + ':enew | NvimTreeFocus<CR>', + { desc = 'New file' }), + dashboard.button('<leader>o', ' Old Files', + ':Telescope oldfiles<CR>', + { desc = 'Old files' }), + dashboard.button('<leader>ff', ' Find File', + ':Telescope find_files<CR>'), + dashboard.button('<leader>fg', ' Find in files') + } +} + +alpha.setup { + layout = { + { + type = 'padding', + val = 2, + }, + header, + { + type = 'padding', + val = 2, + }, + buttons, + { + type = 'padding', + val = 2, + }, + }, +} + +-- vim.api.nvim_create_autocmd("User", { +-- pattern = "AlphaReady", +-- command = "set showtabline=0 | set laststatus=0", +-- }) |