summaryrefslogtreecommitdiff
path: root/dot_config/nvim/init.fnl
diff options
context:
space:
mode:
authorChloƩ Vulquin <code@toast.bunkerlabs.net>2024-07-24 22:10:02 +0200
committerChloƩ Vulquin <code@toast.bunkerlabs.net>2024-07-24 22:10:02 +0200
commit991091228f9e403015edd0106ccfc3a0ce62e304 (patch)
tree44aa6357e395766f1a340fee08aea546ae69c16c /dot_config/nvim/init.fnl
parentnvim: add empty? and update group (diff)
nvim: continue fennel porting
Yeah I'm lazy but these are my dotfiles. A quick summary: * plugins.lsp.attach is now ported * toast.core is reorganized * new nil? and number? checks * new assoc function * new toast.table.unpack function (cross lua compat) * toast.macros.tbl now uses assoc instead of from-pairs and group * apparently I had forgotten to add {pre,post,init}.fnl before, so that's done now Still todo: ftplugin, colors.
Diffstat (limited to '')
-rw-r--r--dot_config/nvim/init.fnl28
1 files changed, 28 insertions, 0 deletions
diff --git a/dot_config/nvim/init.fnl b/dot_config/nvim/init.fnl
new file mode 100644
index 0000000..b74dcd1
--- /dev/null
+++ b/dot_config/nvim/init.fnl
@@ -0,0 +1,28 @@
+; allow running code unconditionally before or after plugins / noplugins are loaded
+(fn doif [path]
+ (let [path (.. (vim.fn.stdpath :config) :/ path)
+ do? (< 0 (vim.fn.filereadable path))]
+ (when do? (dofile path))))
+
+; leader, localleader, options
+(doif :pre.lua)
+
+; plugins
+(if (= 0 (vim.fn.executable :git))
+ (doif :noplugins.lua)
+ (let [lazypath (.. (vim.fn.stdpath :data) :/lazy/lazy.nvim)
+ fstat (vim.loop.fs_stat lazypath)]
+ (when (not fstat)
+ (vim.fn.system [:git
+ :clone
+ :--filter=blob:none
+ :https://github.com/folke/lazy.nvim.git
+ :--branch=stable ; latest stable release
+ lazypath]))
+ (vim.opt.rtp:prepend lazypath)
+ ((. (require :lazy) :setup) :plugins {})
+ (require :bindings)
+ (vim.cmd "colorscheme starlight")))
+
+; custom file associations etc
+(doif :post.lua)