From 211627d54256d651f16822e8d3c558afd68b83be Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Wed, 15 May 2024 13:15:22 -0500 Subject: [PATCH] add alpha greeter plugin and remove all the cmp and lsp stuff for now --- config/nvim/plugins/alpha.lua | 30 ++++++++++++++++++++++++++++++ hosts/familypc/home.nix | 12 ++++-------- 2 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 config/nvim/plugins/alpha.lua diff --git a/config/nvim/plugins/alpha.lua b/config/nvim/plugins/alpha.lua new file mode 100644 index 0000000..fefd529 --- /dev/null +++ b/config/nvim/plugins/alpha.lua @@ -0,0 +1,30 @@ +local alpha = require("alpha") +local dashboard = require("alpha.themes.dashboard") + +-- Set header +dashboard.section.header.val = { + " ", + " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ", + " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ", + " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ", + " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ", + " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ", + " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ", + " ", +} + +-- Set menu +dashboard.section.buttons.val = { + dashboard.button("e", " > New File", "ene"), + dashboard.button("SPC fe", " > Toggle file explorer", "NvimTreeToggle"), + dashboard.button("SPC ff", "󰱼 > Find File", "Telescope find_files"), + dashboard.button("SPC lg", " > Find Word", "Telescope live_grep"), + dashboard.button("SPC wr", "󰁯 > Restore Session For Current Directory", "SessionRestore"), + dashboard.button("q", " > Quit NVIM", "qa"), +} + +-- Send config to alpha +alpha.setup(dashboard.opts) + +-- Disable folding on alpha buffer +vim.cmd([[autocmd FileType alpha setlocal nofoldenable]]) diff --git a/hosts/familypc/home.nix b/hosts/familypc/home.nix index 01734fe..97908ff 100644 --- a/hosts/familypc/home.nix +++ b/hosts/familypc/home.nix @@ -183,6 +183,7 @@ in lua-language-server ]; plugins = with pkgs.vimPlugins; [ + alpha-nvim nvim-treesitter.withAllGrammars lualine-nvim nvim-web-devicons @@ -193,23 +194,18 @@ in } plenary-nvim neodev-nvim - nvim-cmp - nvim-lspconfig luasnip - cmp_luasnip - cmp-nvim-lsp telescope-nvim nvim-tree-lua telescope-fzf-native-nvim vim-tmux-navigator ]; extraLuaConfig = '' - ${builtins.readFile ../../config/nvim/options.lua} ${builtins.readFile ../../config/nvim/keymaps.lua} - ${builtins.readFile ../../config/nvim/plugins/cmp.lua} - ${builtins.readFile ../../config/nvim/plugins/lsp.lua} - ${builtins.readFile ../../config/nvim/plugins/telescope.lua} + ${builtins.readFile ../../config/nvim/options.lua} + ${builtins.readFile ../../config/nvim/plugins/alpha.lua} ${builtins.readFile ../../config/nvim/plugins/nvim-tree.lua} + ${builtins.readFile ../../config/nvim/plugins/telescope.lua} ${builtins.readFile ../../config/nvim/plugins/treesitter.lua} require("Comment").setup() require("lualine").setup({