From ed82f622069233e7b9f817e687865f19fb88b8bb Mon Sep 17 00:00:00 2001 From: triethyl Date: Wed, 9 Jul 2025 00:21:42 -0400 Subject: working on dashboard Former-commit-id: 5f31e111f7ffa0ef63d503c8641d0789cf18b868 --- pkgs/custom-neovim/config/lua/plugins/alpha.lua | 26 ++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'pkgs/custom-neovim/config/lua/plugins/alpha.lua') diff --git a/pkgs/custom-neovim/config/lua/plugins/alpha.lua b/pkgs/custom-neovim/config/lua/plugins/alpha.lua index ef39612..5ccdc3f 100644 --- a/pkgs/custom-neovim/config/lua/plugins/alpha.lua +++ b/pkgs/custom-neovim/config/lua/plugins/alpha.lua @@ -6,16 +6,28 @@ dashboard.section.header.val = art.misc.hydra -- Set menu dashboard.section.buttons.val = { - dashboard.button( "f", " > Find file", ":cd $HOME | Telescope find_files"), + dashboard.button( "f", " > Find file", ":cd $HOME | Telescope find_files"), dashboard.button( "r", " > Find recent file", ":Telescope oldfiles"), - dashboard.button( "s", "Load session", ""), - dashboard.button( "q", " > Quit", ":qa"), + dashboard.button( "s", " > Load session", ""), + dashboard.button( "q", " > Quit", ":qa"), } -- Send config to alpha alpha.setup(dashboard.opts) --- Disable folding on alpha buffer -vim.cmd([[ - autocmd FileType alpha setlocal nofoldenable -]]) +-- Set options just for the dashboard. +vim.api.nvim_create_autocmd("BufEnter", { + pattern = "alpha", + callback = function() + vim.opt_local.foldenable = false -- disable folding + end, +}) + +-- Refresh dashboard when window resized. +vim.api.nvim_create_autocmd("VimResized", { + -- pattern = "alpha", + callback = function() + print("redrawn") + vim.cmd.AlphaRedraw() + end +}) -- cgit v1.2.3