From 2529b023fbaa99480c1ec216130a543e96f1c87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Sat, 4 Oct 2025 00:29:17 +0200 Subject: [PATCH] feat: boostrap mini.deps --- init.lua | 2 ++ lua/config/plugins.lua | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 init.lua create mode 100644 lua/config/plugins.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..d7cf3ef --- /dev/null +++ b/init.lua @@ -0,0 +1,2 @@ +-- import plugins +require("config.plugins") diff --git a/lua/config/plugins.lua b/lua/config/plugins.lua new file mode 100644 index 0000000..251f2de --- /dev/null +++ b/lua/config/plugins.lua @@ -0,0 +1,30 @@ +-- Bootstrap 'mini.nvim' manually in a way that it gets managed by 'mini.deps' +local mini_path = vim.fn.stdpath("data") .. "/site/pack/deps/start/mini.nvim" +if not vim.loop.fs_stat(mini_path) then + vim.cmd('echo "Installing `mini.nvim`" | redraw') + local clone_cmd = { + "git", + "clone", + "--filter=blob:none", + "https://github.com/nvim-mini/mini.nvim", + mini_path, + } + vim.fn.system(clone_cmd) + vim.cmd("packadd mini.nvim | helptags ALL") + vim.cmd('echo "Installed `mini.nvim`" | redraw') +end + +-- Set up 'mini.deps' immediately to have its `now()` and `later()` helpers +require("mini.deps").setup() + +-- Define main config table to be able to use it in scripts +_G.Config = {} + +-- import other plugins +local r = function(m) require("plugins." .. m) end + +local order = {} + +for _, m in ipairs(order) do + r(m) +end