From 22476d08ae70f91bfd5fed6cead99f5a7b8e011d Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 1 Oct 2023 20:43:55 +0900 Subject: feat(pack)!: use lazy.nvim This commit replaces packer.nvim with lazy.nvim to make the lazy-load based package management painless, with lazy.nvim's automatic module lazy-loading and lockfile support. Squashed commit of the following: commit 4b972111b3f91f0b385a6d58640c7751ff8ecd22 Author: sefidel Date: Sun Oct 1 20:43:42 2023 +0900 wip: remove leftover mentions to packer.nvim commit 536106e405b9ec20084b9735a937e80699cdcbb8 Author: sefidel Date: Sun Oct 1 20:33:44 2023 +0900 wip: get rid of luarocks macros commit 6cf35948e4a3081446a9c9414bf350661444df72 Author: sefidel Date: Sun Oct 1 20:18:51 2023 +0900 wip: working lazy.nvim checkpoint commit 407056efd6de976b4d91162c70e3b49cca17664e Author: sefidel Date: Sun Oct 1 13:38:43 2023 +0900 wip: replace packer.nvim with lazy.nvim --- init.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 3e8e14b..82565b8 100644 --- a/init.lua +++ b/init.lua @@ -4,18 +4,22 @@ local run = vim.api.nvim_command -- Enable opt-in filetype.lua: https://github.com/neovim/neovim/pull/16600 vim.g.do_filetype_lua = 1 +local ensure_paths = {} + local function ensure(user, repo) - local install_path = fmt("%s/site/pack/packer/start/%s", vim.fn.stdpath("data"), repo) + local install_path = fmt("%s/lazy/%s", vim.fn.stdpath("data"), repo) + table.insert(ensure_paths, install_path) if vim.fn.empty(vim.fn.glob(install_path)) ~= 0 then print(fmt("Pack '%s' not found, cloning to %s", repo, install_path)) run(fmt("!git clone https://github.com/%s/%s %s", user, repo, install_path)) - run(fmt("packadd %s", repo)) end end -ensure("wbthomason", "packer.nvim") +ensure("folke", "lazy.nvim") ensure("rktjmp", "hotpot.nvim") +vim.opt.rtp:prepend(ensure_paths) + require("hotpot").setup { provide_require_fennel = true } require("nvrc.ignite") -- cgit 1.4.1