blob: d5c7610074f2c0b5fe02efb8dc54c3f4be54b8fa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
(import-macros {: recc} :toast.macros)
; 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)
(recc :lazy :setup :plugins {})
(require :bindings)
(vim.cmd "colorscheme starlight")))
; custom file associations etc
(doif :post.lua)
|