summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-02-13 22:19:05 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-02-13 22:19:05 +0100
commit565f4afeb11fea8e8d9c1d9acdef9df13fc9e45e (patch)
tree29fc8fb7cf11d084352377216f73c0c753612dda
parent99d580087acbbda8d82807ad97505e2addad3ef6 (diff)
Revert to bootstrap fun in init
-rw-r--r--init.lua22
1 files changed, 17 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 3b988cf..edc5f6f 100644
--- a/init.lua
+++ b/init.lua
@@ -1,9 +1,21 @@
-local hotpot_path = vim.fn.stdpath "data" .. "/lazy/" .. "hotpot.nvim"
-if not vim.loop.fs_stat(hotpot_path) then
- vim.notify "You need to run the bootstrapping script!"
- return
+local function ensure(user, plugin)
+ local path = vim.fn.stdpath "data" .. "/lazy/" .. plugin
+ if not vim.loop.fs_stat(path) then
+ vim.notify("Downloading " .. plugin .. "...", vim.log.levels.INFO)
+ vim.fn.system {
+ "git",
+ "clone",
+ "--filter=blob:none",
+ "--single-branch",
+ string.format("https://github.com/%s/%s.git", user, plugin),
+ path,
+ }
+ end
+ vim.opt.runtimepath:prepend(path)
end
-vim.opt.runtimepath:prepend(hotpot_path)
+
+ensure("folke", "lazy.nvim")
+ensure("rktjmp", "hotpot.nvim")
require("hotpot").setup {
provide_require_fennel = true,