aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernuDev <fernu292@gmail.com>2024-07-08 22:34:32 -0600
committerFernuDev <fernu292@gmail.com>2024-07-08 22:34:32 -0600
commite2f3978f9149253b5cf5df8346e6428ef189db15 (patch)
treed01d1477ff857fce5286766652466fca98ec820f
parentfd0344c5e578cbd6b1a4a5dff18e927956157e02 (diff)
update: Update plugins, added alpha plugin
-rw-r--r--config/nvim/lazy-lock.json1
-rw-r--r--config/nvim/lua/plugins/alpha.lua105
-rw-r--r--config/nvim/lua/plugins/catppuccin.lua4
3 files changed, 109 insertions, 1 deletions
diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json
index 83f0c66c..b26c6d27 100644
--- a/config/nvim/lazy-lock.json
+++ b/config/nvim/lazy-lock.json
@@ -1,4 +1,5 @@
{
+ "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
"catppuccin": { "branch": "main", "commit": "894efb557728e532aa98b98029d16907a214ec05" },
"lazy.nvim": { "branch": "main", "commit": "dea1f687fe6e15eb3098557a69d44231ebcb6cf5" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
diff --git a/config/nvim/lua/plugins/alpha.lua b/config/nvim/lua/plugins/alpha.lua
new file mode 100644
index 00000000..a3346f1b
--- /dev/null
+++ b/config/nvim/lua/plugins/alpha.lua
@@ -0,0 +1,105 @@
+--- @type LazyPluginSpec
+return {
+ "goolord/alpha-nvim",
+ event = "VimEnter",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ opts = function()
+ local dashboard = require("alpha.themes.dashboard")
+ require("alpha.term")
+ local arttoggle = false
+
+ local logo = {
+ [[ ]],
+ [[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ]],
+ [[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ]],
+ [[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ]],
+ [[ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ]],
+ [[ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ]],
+ [[ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]],
+ [[ ]],
+ }
+
+ local art = {
+ -- { name, width, height }
+ { "tohru", 62, 17 },
+ }
+
+ if arttoggle == true then
+ dashboard.opts.opts.noautocmd = true
+ dashboard.section.terminal.opts.redraw = true
+ local path = vim.fn.stdpath("config") .. "/assets/"
+ -- local random = math.random(1, #art)
+ local currentart = art[1]
+ dashboard.section.terminal.command = "cat " .. path .. currentart[1]
+
+ dashboard.section.terminal.width = currentart[2]
+ dashboard.section.terminal.height = currentart[3]
+
+ dashboard.opts.layout = {
+ dashboard.section.terminal,
+ { type = "padding", val = 2 },
+ dashboard.section.buttons,
+ dashboard.section.footer,
+ }
+ else
+ dashboard.section.header.val = logo
+ end
+ dashboard.section.buttons.val = {
+ dashboard.button("f", " " .. "Find files", ":Telescope find_files <CR>"),
+ }
+ for _, button in ipairs(dashboard.section.buttons.val) do
+ button.opts.hl = "AlphaButtons"
+ button.opts.hl_shortcut = "AlphaShortcut"
+ end
+ dashboard.section.header.opts.hl = "Function"
+ dashboard.section.buttons.opts.hl = "Identifier"
+ dashboard.section.footer.opts.hl = "Function"
+ dashboard.opts.layout[1].val = 4
+ return dashboard
+ end,
+ config = function(_, dashboard)
+ if vim.o.filetype == "lazy" then
+ vim.cmd.close()
+ vim.api.nvim_create_autocmd("User", {
+ pattern = "AlphaReady",
+ callback = function()
+ require("lazy").show()
+ end,
+ })
+ end
+ require("alpha").setup(dashboard.opts)
+ vim.api.nvim_create_autocmd("User", {
+ pattern = "LazyVimStarted",
+ callback = function()
+ local v = vim.version()
+ local dev = ""
+ if v.prerelease == "dev" then
+ dev = "-dev+" .. v.build
+ else
+ dev = ""
+ end
+ local version = v.major .. "." .. v.minor .. "." .. v.patch .. dev
+ local stats = require("lazy").stats()
+ local plugins_count = stats.loaded .. "/" .. stats.count
+ local ms = math.floor(stats.startuptime + 0.5)
+ local time = vim.fn.strftime("%H:%M:%S")
+ local date = vim.fn.strftime("%d.%m.%Y")
+ local line1 = " " .. plugins_count .. " plugins loaded in " .. ms .. "ms"
+ local line2 = "󰃭 " .. date .. "  " .. time
+ local line3 = " " .. version
+
+ local line1_width = vim.fn.strdisplaywidth(line1)
+ local line2Padded = string.rep(" ", (line1_width - vim.fn.strdisplaywidth(line2)) / 2) .. line2
+ local line3Padded = string.rep(" ", (line1_width - vim.fn.strdisplaywidth(line3)) / 2) .. line3
+
+ dashboard.section.footer.val = {
+ line1,
+ line2Padded,
+ line3Padded,
+ }
+ pcall(vim.cmd.AlphaRedraw)
+ end,
+ })
+ end,
+}
+
diff --git a/config/nvim/lua/plugins/catppuccin.lua b/config/nvim/lua/plugins/catppuccin.lua
index 3b8ac406..6d05f984 100644
--- a/config/nvim/lua/plugins/catppuccin.lua
+++ b/config/nvim/lua/plugins/catppuccin.lua
@@ -4,8 +4,10 @@ return {
name = "catppuccin",
priority = 1000,
config = function()
+ require("catppuccin").setup({
+ transparent_background = true,
+ })
vim.cmd.colorscheme "catppuccin"
- transparent_background = true
end
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage