diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua deleted file mode 100644 index b91c233..0000000 --- a/lua/plugins/configs/alpha.lua +++ /dev/null @@ -1,110 +0,0 @@ -local present, alpha = pcall(require, "alpha") - -if not present then - return -end - -require("base46").load_highlight "alpha" - -local function button(sc, txt, keybind) - local sc_ = sc:gsub("%s", ""):gsub("SPC", "") - - local opts = { - position = "center", - text = txt, - shortcut = sc, - cursor = 5, - width = 36, - align_shortcut = "right", - hl = "AlphaButtons", - } - - if keybind then - opts.keymap = { "n", sc_, keybind, { noremap = true, silent = true } } - end - - return { - type = "button", - val = txt, - on_press = function() - local key = vim.api.nvim_replace_termcodes(sc_, true, false, true) or "" - vim.api.nvim_feedkeys(key, "normal", false) - end, - opts = opts, - } -end - --- dynamic header padding -local fn = vim.fn -local marginTopPercent = 0.3 -local headerPadding = fn.max { 2, fn.floor(fn.winheight(0) * marginTopPercent) } - -local options = { - - header = { - type = "text", - val = { - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", - }, - opts = { - position = "center", - hl = "AlphaHeader", - }, - }, - - buttons = { - type = "group", - val = { - button("SPC f f", " Find File ", ":Telescope find_files"), - button("SPC f o", " Recent File ", ":Telescope oldfiles"), - button("SPC f w", " Find Word ", ":Telescope live_grep"), - button("SPC b m", " Bookmarks ", ":Telescope marks"), - button("SPC t h", " Themes ", ":Telescope themes"), - button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h "), - }, - opts = { - spacing = 1, - }, - }, - - headerPaddingTop = { type = "padding", val = headerPadding }, - headerPaddingBottom = { type = "padding", val = 2 }, -} - -options = require("core.utils").load_override(options, "goolord/alpha-nvim") - -alpha.setup { - layout = { - options.headerPaddingTop, - options.header, - options.headerPaddingBottom, - options.buttons, - }, - opts = {}, -} - --- Disable statusline in dashboard -vim.api.nvim_create_autocmd("FileType", { - pattern = "alpha", - callback = function() - -- store current statusline value and use that - local old_laststatus = vim.opt.laststatus - vim.api.nvim_create_autocmd("BufUnload", { - buffer = 0, - callback = function() - vim.opt.laststatus = old_laststatus - end, - }) - vim.opt.laststatus = 0 - end, -}) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 0f1733e..c4f4fba 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -14,7 +14,6 @@ local options = { disable_netrw = true, hijack_netrw = true, open_on_setup = false, - ignore_ft_on_setup = { "alpha" }, hijack_cursor = true, hijack_unnamed_buffer_when_opening = false, update_cwd = true, diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 2b50e0c..9c3786a 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -37,7 +37,6 @@ M.blankline = function() filetype_exclude = { "help", "terminal", - "alpha", "packer", "lspinfo", "TelescopePrompt", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 778efd5..24d6ff7 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -150,14 +150,6 @@ local plugins = { end, }, - ["goolord/alpha-nvim"] = { - after = "base46", - disable = true, - config = function() - require "plugins.configs.alpha" - end, - }, - ["numToStr/Comment.nvim"] = { module = "Comment", keys = { "gc", "gb" }, @@ -171,7 +163,6 @@ local plugins = { -- file managing , picker etc ["kyazdani42/nvim-tree.lua"] = { - ft = "alpha", cmd = { "NvimTreeToggle", "NvimTreeFocus" }, config = function() require "plugins.configs.nvimtree"