From 580e5057c2caf29934692d98b90151bb7b698ce8 Mon Sep 17 00:00:00 2001 From: max397574 Date: Thu, 23 Dec 2021 15:17:32 +0100 Subject: feat(headers): don't use functions but tables --- lua/startup/headers.lua | 60 +++++++++++++++++++++++++++++++++++++++++---- lua/startup/themes/evil.lua | 14 +++++------ readme.md | 2 +- 3 files changed, 63 insertions(+), 13 deletions(-) diff --git a/lua/startup/headers.lua b/lua/startup/headers.lua index 99618d6..a9b7fc3 100644 --- a/lua/startup/headers.lua +++ b/lua/startup/headers.lua @@ -2,10 +2,13 @@ ---@brief [[ --- This are headers which you can use to build your own startup.nvim theme. ---@brief ]] -local headers = {} +local startup_headers = {} + +local log = require"startup.log" ---a neovim banner -function headers.default_header() +function startup_headers.neovim_banner() + log.warn("`headers.neovim_banner()` is deprecated. Use `headers.neovim_banner_header`") return { " /$$ ", " |__/ ", @@ -17,9 +20,20 @@ function headers.default_header() "|__/ |__/ \\_______/ \\______/ \\_/ |__/|__/ |__/ |__/", } end +startup_headers.neovim_banner_header = { + " /$$ ", + " |__/ ", + " /$$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$$$$$/$$$$ ", + "| $$__ $$ /$$__ $$ /$$__ $$| $$ /$$/| $$| $$_ $$_ $$", + "| $$ \\ $$| $$$$$$$$| $$ \\ $$ \\ $$/$$/ | $$| $$ \\ $$ \\ $$", + "| $$ | $$| $$_____/| $$ | $$ \\ $$$/ | $$| $$ | $$ | $$", + "| $$ | $$| $$$$$$$| $$$$$$/ \\ $/ | $$| $$ | $$ | $$", + "|__/ |__/ \\_______/ \\______/ \\_/ |__/|__/ |__/ |__/", +} ---a hydra -function headers.hydra() +function startup_headers.hydra() + log.warn("`headers.hydra()` is deprecated. Use `headers.hydra_header`") return { " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", @@ -35,8 +49,23 @@ function headers.hydra() } end +startup_headers.hydra_header = { + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", +} + ---a neovim `n` -function headers.neovim_logo() +function startup_headers.neovim_logo() + log.warn("`headers.neovim_logo()` is deprecated. Use `headers.neovim_logo_header`") return { "⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣄⠀⠀⠀⠀⠀⠀⠀", "⠀⠀⠀⠀⠀⠀⣀⣶⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣷⣄⠀⠀⠀⠀⠀", @@ -59,5 +88,26 @@ function headers.neovim_logo() "⠀⠀⠀⠀⠀⠀⠀⠀⠙⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠋ ", } end +startup_headers.neovim_logo_header = { + "⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣄⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⣀⣶⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣷⣄⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⣀⣶⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣷⣄⠀⠀⠀", + "⠀⠀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣷⡀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣷⣄⠀", + "⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠄⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣷", + "⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡂⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⣿⣿⣿⣿⣿⣿⣿⣿⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣦⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⢿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿", + "⠀⠀⠙⢿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀", + "⠀⠀⠀⠀⠙⢿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠙⢿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⡿⠋⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠙⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠋ ", +} -return headers +return startup_headers diff --git a/lua/startup/themes/evil.lua b/lua/startup/themes/evil.lua index dba72bc..3471329 100644 --- a/lua/startup/themes/evil.lua +++ b/lua/startup/themes/evil.lua @@ -6,7 +6,7 @@ local settings = { fold_section = false, title = "Header", margin = 5, - content = require("startup.headers").hydra(), + content = require("startup.headers").hydra_header, highlight = "Statement", default_color = "", oldfiles_amount = 0, @@ -31,12 +31,12 @@ local settings = { title = "Basic Commands", margin = 5, content = { - {" Find File", "Telescope find_files", "ff" }, - {" Find Word", "Telescope live_grep", "lg" }, - {" Recent Files", "Telescope oldfiles", "of" }, - {" File Browser", "Telescope file_browser", "fb" }, - {" Colorschemes", "Telescope colorscheme", "cs" }, - {" New File", "lua require'startup'.new_file()", "nf" }, + { " Find File", "Telescope find_files", "ff" }, + { " Find Word", "Telescope live_grep", "lg" }, + { " Recent Files", "Telescope oldfiles", "of" }, + { " File Browser", "Telescope file_browser", "fb" }, + { " Colorschemes", "Telescope colorscheme", "cs" }, + { " New File", "lua require'startup'.new_file()", "nf" }, }, highlight = "String", default_color = "", diff --git a/readme.md b/readme.md index da05b9e..bed57a7 100644 --- a/readme.md +++ b/readme.md @@ -276,7 +276,7 @@ Just copy all the setting from it and change whatever you want. You can use some functions from `lua/startup/functions.lua` with `require("startup.functions").function_name()`. They are documented in `:help startup_nvim.functions`. The same applies to headers. -Here you can use them with `require("startup.headers").header_name()`. +Here you can use them with `require("startup.headers").header_name`. They are documented in `:help startup_nvim.headers`. A good tool to create your own headers is [image to braille](https://505e06b2.github.io/Image-to-Braille/). -- cgit v1.2.3