From 8e2f4297ba08f945e4f78d7c3a86aa4cc1e553ed Mon Sep 17 00:00:00 2001 From: triethyl Date: Fri, 11 Jul 2025 17:01:04 -0400 Subject: working on adding snacks.nvim Former-commit-id: 4e263cc0bcc079adaa4eb9487c7c31553e186388 --- pkgs/custom-neovim/config/lua/plugins/alpha.lua | 64 ++++++++++++++++++---- .../config/lua/plugins/snacks/dashboard.lua | 1 + .../custom-neovim/config/lua/plugins/which-key.lua | 4 +- 3 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 pkgs/custom-neovim/config/lua/plugins/snacks/dashboard.lua (limited to 'pkgs/custom-neovim/config/lua') diff --git a/pkgs/custom-neovim/config/lua/plugins/alpha.lua b/pkgs/custom-neovim/config/lua/plugins/alpha.lua index 42ad1e4..f377b0d 100644 --- a/pkgs/custom-neovim/config/lua/plugins/alpha.lua +++ b/pkgs/custom-neovim/config/lua/plugins/alpha.lua @@ -1,20 +1,60 @@ local alpha = require("alpha") local dashboard = require("alpha.themes.dashboard") --- Set header -dashboard.section.header.val = Art.misc.hydra +-- -- Set header +-- 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( "r", " > Find recent file", ":Telescope oldfiles" ), - dashboard.button( "s", " > Load session", ":Telescope persisted" ), - dashboard.button( "l", " > Load last session", ":SessionLoadLast" ), - dashboard.button( "q", " > Quit", ":qa" ), -} +-- -- Set menu +-- dashboard.section.buttons.val = { +-- dashboard.button( "f", " > Find file", ":cd $HOME | Telescope find_files" ), +-- dashboard.button( "r", " > Find recent file", ":Telescope oldfiles" ), +-- dashboard.button( "s", " > Load session", ":Telescope persisted" ), +-- dashboard.button( "l", " > Load last session", ":SessionLoadLast" ), +-- dashboard.button( "q", " > Quit", ":qa" ), +-- } + +-- -- Center components. +-- dashboard.section.header.opts.position = "center" +-- dashboard.section.footer.opts.position = "center" --- Send config to alpha -alpha.setup(dashboard.opts) +-- -- Send config to alpha +-- alpha.setup(dashboard.opts) + +require("alpha").setup { + dashboard = { + config = {}, + opts = { + autostart = true + }, + section = { + buttons = { + entries = { { "f", "󰈞 Find File", "Telescope find_files" }, { "n", " New File", "ene!" }, { "p", " Projects ", "Telescope projects" }, { "r", " Recent files", +":Telescope oldfiles " }, { "t", "󰊄 Find Text", "Telescope live_grep" }, { "c", " Configuration", "edit /home/lucas/.config/lvim/config.lua " }, { "q", "󰅖 Quit", "quit" +} }, + opts = { + hl_shortcut = "Include", + spacing = 1 + } + }, + footer = { + opts = { + hl = "Number", + position = "center" + }, + type = "text", + val = { " ", " lunarvim.org", "release-1.4/neovim-0.9-d15c8d7" } + }, + header = { + opts = { + hl = "Label", + position = "center" + }, + type = "text", + } + } + }, + mode = "dashboard", +} -- Set options just for the dashboard. vim.api.nvim_create_autocmd("BufEnter", { diff --git a/pkgs/custom-neovim/config/lua/plugins/snacks/dashboard.lua b/pkgs/custom-neovim/config/lua/plugins/snacks/dashboard.lua new file mode 100644 index 0000000..1ef8c32 --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/snacks/dashboard.lua @@ -0,0 +1 @@ +require("snacks").setup() diff --git a/pkgs/custom-neovim/config/lua/plugins/which-key.lua b/pkgs/custom-neovim/config/lua/plugins/which-key.lua index d654699..612af14 100644 --- a/pkgs/custom-neovim/config/lua/plugins/which-key.lua +++ b/pkgs/custom-neovim/config/lua/plugins/which-key.lua @@ -1 +1,3 @@ -require("which-key").setup() +require("which-key").setup { + preset = "modern", +} -- cgit v1.2.3