summaryrefslogtreecommitdiff
path: root/fnl/plugins/editor/alpha.fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-07-12 21:46:07 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-07-12 21:46:07 +0200
commitdf211fae51faddd7b47b78806660e21f6ec1a694 (patch)
tree9884c4945a1e60f19c52e4746953f0212b7fc8a7 /fnl/plugins/editor/alpha.fnl
parent9ccdc18b7926ed5e069e7f305ac5ec304f87a65f (diff)
Debloat loading of plugins
Diffstat (limited to 'fnl/plugins/editor/alpha.fnl')
-rw-r--r--fnl/plugins/editor/alpha.fnl49
1 files changed, 49 insertions, 0 deletions
diff --git a/fnl/plugins/editor/alpha.fnl b/fnl/plugins/editor/alpha.fnl
new file mode 100644
index 0000000..c9dce50
--- /dev/null
+++ b/fnl/plugins/editor/alpha.fnl
@@ -0,0 +1,49 @@
+;; A customizable greeter.
+
+(local icons (require :plugins.icons))
+
+(local ascii-art [" ##############..... ############## "
+ " ##############......############## "
+ " ##########..........########## "
+ " ##########........########## "
+ " ##########.......########## "
+ " ##########.....##########.. "
+ " ##########....##########..... "
+ " ..##########..##########......... "
+ " ....##########.#########............. "
+ " ..################JJJ............ "
+ " ################............. "
+ " ##############.JJJ.JJJJJJJJJJ "
+ " ############...JJ...JJ..JJ JJ "
+ " ##########....JJ...JJ..JJ JJ "
+ " ########......JJJ..JJJ JJJ JJJ "
+ " ###### ......... "
+ " ..... "
+ " . "])
+
+(fn setup []
+ (let [alpha (require :alpha)]
+ (let [dashboard (require :alpha.themes.dashboard)]
+ (set dashboard.section.header.val ascii-art)
+ (set dashboard.section.buttons.val
+ [(dashboard.button :f (.. (. icons :search-files) " Find file")
+ ":Telescope find_files theme=dropdown<CR>")
+ (dashboard.button :g (.. (. icons :search-text) " Find text")
+ ":Telescope live_grep theme=dropdown<CR>")
+ (dashboard.button :p (.. (. icons :search-project) " Find project")
+ ":Telescope projects theme=dropdown<CR>")
+ (dashboard.button :r (.. (. icons :recent-files) " Recently used files")
+ ":Telescope oldfiles theme=dropdown<CR>")
+ (dashboard.button :t (.. (. icons :cog) " Configuration")
+ ":e ~/.config/nvim/init.lua <CR>")
+ (dashboard.button :o (.. (. icons :org) " Org")
+ ":Telescope find_files theme=dropdown cwd=~/.local/share/org<CR>")])
+ (set dashboard.section.header.opts.hl :AlphaHeader)
+ (set dashboard.section.buttons.opts.hl :AlphaButtons)
+ (set dashboard.opts.opts.noautocmd true)
+ (alpha.setup dashboard.opts))))
+
+{1 :goolord/alpha-nvim
+ :event :VimEnter
+ :config (fn []
+ (setup))}