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/art.lua | 20 ++++++++--------- pkgs/custom-neovim/config/lua/plugins/alpha.lua | 26 ++++++++++++++++------ .../config/lua/plugins/mini/starter.lua | 1 + 3 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 pkgs/custom-neovim/config/lua/plugins/mini/starter.lua (limited to 'pkgs/custom-neovim/config/lua') diff --git a/pkgs/custom-neovim/config/lua/art.lua b/pkgs/custom-neovim/config/lua/art.lua index 76f2bfb..1927173 100644 --- a/pkgs/custom-neovim/config/lua/art.lua +++ b/pkgs/custom-neovim/config/lua/art.lua @@ -3,16 +3,16 @@ art = { space = { saturn = { - [[ ~+ ]] - [[ * + ]] - [[ ' | ]] - [[ () .-.,="``"=. - o - ]] - [[ '=/_ \ | ]] - [[ * | '=._ | ]] - [[ \ `=./`, ' ]] - [[ . '=.__.=' `=' * ]] - [[ + + ]] - [[ O * ' . ]] + [[ ~+ ]], + [[ * + ]], + [[ ' | ]], + [[ () .-.,="``"=. - o - ]], + [[ '=/_ \ | ]], + [[ * | '=._ | ]], + [[ \ `=./`, ' ]], + [[ . '=.__.=' `=' * ]], + [[ + + ]], + [[ O * ' . ]], }, }, neovim = { 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 +}) diff --git a/pkgs/custom-neovim/config/lua/plugins/mini/starter.lua b/pkgs/custom-neovim/config/lua/plugins/mini/starter.lua new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/mini/starter.lua @@ -0,0 +1 @@ + -- cgit v1.2.3