summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-01-06 00:01:57 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-01-06 00:01:57 +0100
commit1183cda31a964aac838420ceef6de54c542e4ea7 (patch)
treeb9a8311a50f0101b305365a8997e302fbb627780
parent0b31db0cbfeb036311e143bb681f2c509860b1ca (diff)
Load settings and plugins from aktersnurra
-rw-r--r--fnl/aktersnurra.fnl22
-rw-r--r--fnl/plugins/init.fnl10
-rw-r--r--init.lua1
3 files changed, 17 insertions, 16 deletions
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 :<leader>y "<cmd>Lazy home<cr>" {:desc :Home})
- (lazy.setup plugins opts))
+(fn init []
+ (require :settings)
+ (let [lazy (require :lazy)]
+ (vim.keymap.set :n :<leader>y "<cmd>Lazy home<cr>" {: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"