From c1a96e788c36bc242ea6282afa5f066fc3946f29 Mon Sep 17 00:00:00 2001 From: Buddy Date: Sat, 24 Oct 2026 14:53:55 -0700 Subject: [PATCH] refactor: self-bootstrap lazy.nvim instead of chezmoi archive external Replace the chezmoiexternal tarball install with the standard lazy.nvim bootstrap snippet (clone-if-missing, pinned to v11.17.5, the current latest stable tag). Gives lazy.nvim a real git checkout instead of an extracted tarball, and drops chezmoi from the loop entirely for this one piece - bumping the version is now just editing the --branch tag in init.lua. --- .chezmoiexternal.toml.tmpl | 8 -------- dot_config/nvim/init.lua | 21 ++++++++++++++++++++- 2 files changed, 20 insertions(+), 9 deletions(-) delete mode 100644 .chezmoiexternal.toml.tmpl diff --git a/.chezmoiexternal.toml.tmpl b/.chezmoiexternal.toml.tmpl deleted file mode 100644 index 7612da4..0000000 --- a/.chezmoiexternal.toml.tmpl +++ /dev/null @@ -1,8 +0,0 @@ -# chezmoi:template:left-delimiter=#{{ -#{{- /* vim: set filetype=toml: */ -}} -[".local/share/nvim/lazy.nvim"] - type = "archive" - url = "https://github.com/folke/lazy.nvim/archive/refs/tags/v11.17.5.tar.gz" - exact = true - stripComponents = 1 - refreshPeriod = "2196h" diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua index e92ab0d..c5ebe2b 100644 --- a/dot_config/nvim/init.lua +++ b/dot_config/nvim/init.lua @@ -1,5 +1,24 @@ require("core.config") -vim.opt.runtimepath:prepend(vim.fn.stdpath("data") .. "/lazy.nvim") + +local lazypath = vim.fn.stdpath("data") .. "/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + local out = vim.fn.system({ + "git", "clone", "--filter=blob:none", + "--branch=v11.17.5", + "https://github.com/folke/lazy.nvim.git", + lazypath, + }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.runtimepath:prepend(lazypath) + require("lazy").setup({ spec = { { import = "plugins" },