From c7421a5b0f5736664f83b038c321e6fa3f2355c0 Mon Sep 17 00:00:00 2001 From: Jose Pedro Oliveira Date: Sun, 21 Jul 2024 10:34:18 +0200 Subject: [PATCH] Revert "improv: use lazy.nvim's recommended bootstrap (better fix for #3)" This reverts commit 0d569e5da47d05431fd5f133f857369ed09ab86e. Downloading the lazy bootstrap code everytime that nvim is executed completely breaks neovim if the user is offline or in networks with resticted internet access. The uncached usage of the bootstrap code is also not cost-effective. --- kickstart-python.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kickstart-python.lua b/kickstart-python.lua index 660f0ec..bb9bc6b 100644 --- a/kickstart-python.lua +++ b/kickstart-python.lua @@ -1,5 +1,11 @@ --- BOOTSTRAP LAZY.NVIM https://lazy.folke.io/developers#bootstrap -load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +-- BOOTSTRAP the plugin manager `lazy.nvim` +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.uv.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 error("Error cloning lazy.nvim:\n" .. out) end +end +vim.opt.runtimepath:prepend(lazypath) -------------------------------------------------------------------------------- -- BASIC PYTHON-RELATED OPTIONS