From f59acf69f6682e37d10eb7de1f04f27ec06fce13 Mon Sep 17 00:00:00 2001 From: Diachk Date: Wed, 3 Jan 2024 23:09:32 +0100 Subject: [PATCH] update splash screen --- lazy-lock.json | 3 ++- lua/config/lazy.lua | 1 + lua/plugins/file-browser.lua | 13 ++++++++++ lua/plugins/splash-screen.lua | 49 +++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/file-browser.lua create mode 100644 lua/plugins/splash-screen.lua diff --git a/lazy-lock.json b/lazy-lock.json index 15687c3..82fce1c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,6 +2,7 @@ "LazyVim": { "branch": "main", "commit": "879e29504d43e9f178d967ecc34d482f902e5a91" }, "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" }, "SchemaStore.nvim": { "branch": "main", "commit": "90149d11708d38037e340bf7a668e1a79217680d" }, + "alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" }, "bufferline.nvim": { "branch": "main", "commit": "e48ce1805697e4bb97bc171c081e849a65859244" }, "catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, @@ -9,7 +10,6 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "c4b2efb8aee4af0ef179a9b49ba401de3c4ef5d2" }, - "dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" }, "dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, @@ -44,6 +44,7 @@ "nvim-web-devicons": { "branch": "master", "commit": "3e24abe1ae66532135cec911562f553fe247cb56" }, "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "4bd5657b14b58e069287f5ac591a647bb860b2ed" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "master", "commit": "983460fb8cd864748311f4c7f0c8337091f24d59" }, "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index c706e93..ea63067 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -15,6 +15,7 @@ require("lazy").setup({ { import = "lazyvim.plugins.extras.lang.json" }, { import = "lazyvim.plugins.extras.linting.eslint" }, { import = "lazyvim.plugins.extras.formatting.prettier" }, + { import = "lazyvim.plugins.extras.ui.alpha" }, -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, -- import/override with your plugins { import = "plugins" }, diff --git a/lua/plugins/file-browser.lua b/lua/plugins/file-browser.lua new file mode 100644 index 0000000..902e979 --- /dev/null +++ b/lua/plugins/file-browser.lua @@ -0,0 +1,13 @@ +return { + "nvim-telescope/telescope-file-browser.nvim", + keys = { + { + "sB", + ":Telescope file_browser path=%:p:h=%:p:h", + desc = "Browse Files", + }, + }, + config = function() + require("telescope").load_extension("file_browser") + end, +} diff --git a/lua/plugins/splash-screen.lua b/lua/plugins/splash-screen.lua new file mode 100644 index 0000000..31955ab --- /dev/null +++ b/lua/plugins/splash-screen.lua @@ -0,0 +1,49 @@ +local header = { + [[ ,----------------, ,---------,]], + [[ ,-----------------------, ," ,"|]], + [[ ," ,"| ," ," |]], + [[ +-----------------------+ | ," ," |]], + [[ | .-----------------. | | +---------+ |]], + [[ | | C A N | | | | -==----'| |]], + [[ | | Y O U | | | | | |]], + [[ | | E X I T | | |/----|`---= | |]], + [[ | | ? | | | ,/|==== ooo | ;]], + [[ | | C:\>_vim | | | // |(((( [33]| ,"]], + [[ | `-----------------' |," .;'| |(((( | ,"]], + [[ +-----------------------+ ;; | | |,"]], + [[ /_)______________(_/ //' | +---------+]], + [[ ___________________________/___ `,]], + [[ / oooooooooooooooo .o. oooo /, \,"-----------]], + [[ / ==ooooooooooooooo==.o. ooo= // ,`\--{)B ,"]], + [[/_==__==========__==_ooo__ooo=_/' /___________,"]], + [[`-----------------------------']], +} + +local lazy = vim.split( + [[ + ██╗ █████╗ ███████╗██╗ ██╗ Z + ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝ Z + ██║ ███████║ ███╔╝ ╚████╔╝ z + ██║ ██╔══██║ ███╔╝ ╚██╔╝ z + ███████╗██║ ██║███████╗ ██║ + ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ + ]], + "\n" +) + +return { + "goolord/alpha-nvim", + opts = function(_, opts) + opts.section.header.val = lazy + local dashboard = require("alpha.themes.dashboard") + dashboard.section.buttons.val = { + -- dashboard.button('n', ' New file', ':ene startinsert '), + dashboard.button("r", " Recent files", ":Telescope oldfiles "), + -- dashboard.button('f', '󰥨 Find file', ':Telescope find_files '), + -- dashboard.button('g', '󰱼 Find text', ':Telescope live_grep '), + -- dashboard.button('s', ' Restore Session', [[:lua require('persistence').load() ]]), + dashboard.button("l", "󰒲 Lazy", ":Lazy"), + dashboard.button("q", " Quit", ":qa"), + } + end, +}