From 1183cda31a964aac838420ceef6de54c542e4ea7 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sat, 6 Jan 2024 00:01:57 +0100 Subject: Load settings and plugins from aktersnurra --- fnl/aktersnurra.fnl | 22 +++++++++++++++++----- fnl/plugins/init.fnl | 10 ---------- init.lua | 1 - 3 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 fnl/plugins/init.fnl diff --git a/fnl/aktersnurra.fnl b/fnl/aktersnurra.fnl index f9c7ca2..adf6598 100644 --- a/fnl/aktersnurra.fnl +++ b/fnl/aktersnurra.fnl @@ -1,6 +1,15 @@ ;; Load plugins with lazy. -(local icons (require :icons)) +(local plugins (let [plugins [] + path (.. (vim.fn.stdpath :config) :/fnl/plugins)] + (each [fname (vim.fs.dir path)] + (let [fname (fname:match "^(.*)%.fnl$")] + (if (and (not= fname nil) (not= fname :icons)) + (table.insert plugins (require (.. :plugins. fname)))))) + (table.insert plugins (require :plugins.lsp)) + plugins)) + +(local icons (require :settings.icons)) (local opts {:install {:colorscheme [:no-clown-fiesta]} :debug false @@ -34,7 +43,10 @@ (.. (. icons :star) " ") (.. (. icons :line) " ")]}}}) -(let [lazy (require :lazy) - plugins (require :plugins)] - (vim.keymap.set :n :y "Lazy home" {:desc :Home}) - (lazy.setup plugins opts)) +(fn init [] + (require :settings) + (let [lazy (require :lazy)] + (vim.keymap.set :n :y "Lazy home" {:desc :Home}) + (lazy.setup plugins opts))) + +(init) diff --git a/fnl/plugins/init.fnl b/fnl/plugins/init.fnl deleted file mode 100644 index 470776e..0000000 --- a/fnl/plugins/init.fnl +++ /dev/null @@ -1,10 +0,0 @@ -;; Load all plugins. - -(let [plugins [] - path (.. (vim.fn.stdpath :config) :/fnl/plugins)] - (each [fname (vim.fs.dir path)] - (let [fname (fname:match "^(.*)%.fnl$")] - (if (and (not= fname nil) (not= fname :init)) - (table.insert plugins (require (.. :plugins. fname)))))) - (table.insert plugins (require :plugins.lsp)) - plugins) diff --git a/init.lua b/init.lua index ef21aa9..7bfe1b4 100644 --- a/init.lua +++ b/init.lua @@ -25,5 +25,4 @@ require("hotpot").setup { }, }, } -require "settings" require "aktersnurra" -- cgit v1.2.3-70-g09d2