summaryrefslogtreecommitdiff
path: root/lua/core/lazy.lua
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-09-07 22:23:26 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2024-09-07 22:23:26 -0400
commit167b84d94a0ea1986ae391ccfba162b382b0d33b (patch)
tree528778d9f1b564371c3f8c73c4dba93aa17c392e /lua/core/lazy.lua
parent927fbd79d51fc9908013b47d8b0ad4b0be126296 (diff)
Future-proof lazy.nvim bootstrap
Diffstat (limited to 'lua/core/lazy.lua')
-rw-r--r--lua/core/lazy.lua40
1 files changed, 40 insertions, 0 deletions
diff --git a/lua/core/lazy.lua b/lua/core/lazy.lua
new file mode 100644
index 0000000..364be6f
--- /dev/null
+++ b/lua/core/lazy.lua
@@ -0,0 +1,40 @@
+-- _
+-- | | __ _ _____ _
+-- | | / _` |_ / | | |
+-- | |__| (_| |/ /| |_| |
+-- |_____\__,_/___|\__, |
+-- |___/
+--
+-- Bootstrap lazy.nvim {{{
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+if not (vim.uv or vim.loop).fs_stat(lazypath) then
+ local lazyrepo = "https://github.com/folke/lazy.nvim.git"
+ local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
+ if vim.v.shell_error ~= 0 then
+ vim.api.nvim_echo({
+ { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
+ { out, "WarningMsg" },
+ { "\nPress any key to exit..." },
+ }, true, {})
+ vim.fn.getchar()
+ os.exit(1)
+ end
+end
+vim.opt.rtp:prepend(lazypath)
+-- }}}
+-- Configure Lazy {{{
+require("lazy").setup({
+ { import = "plugins" }, -- i.e. the lua/plugins directory
+ -- add more subdirectories as needed
+}, {
+ install = { colorscheme = { "no-clown-fiesta" } },
+}, {
+ checker = {
+ enabled = true,
+ notify = false,
+ },
+ change_detection = {
+ notify = false,
+ },
+})
+-- }}}