-- Clone 'mini.nvim' manually in a way that it gets managed by 'mini.deps'
local pkgpat  = vim.fn.stdpath('data') .. '/site/'
local minipat = pkgpat .. 'pack/deps/start/mini.nvim'
if not vim.uv.fs_stat(minipat) then
	vim.cmd('echo "Installing [`mini.nvim`](../doc/mini-nvim.qmd#mini.nvim)" | redraw')
	local clone_cmd = {
		'git', 'clone', '--filter=blob:none',
		'https://github.com/nvim-mini/mini.nvim', minipat
	}
	vim.fn.system(clone_cmd)
	vim.cmd('packadd mini.nvim | helptags ALL')
	vim.cmd('echo "Installed [`mini.nvim`](../doc/mini-nvim.qmd#mini.nvim)" | redraw')
end
require('mini.deps').setup({ path = { package = pkgpat } })

require('plugin.auto-session')
require('plugin.blink-cmp')
require('plugin.conform')
require('plugin.gruvbox')
require('plugin.lazydev')
require('plugin.lspconfig')
require('plugin.luasnip')
require('plugin.mini')
require('plugin.nvim-lint')
require('plugin.nvim-treesitter')
require('plugin.toggleterm')
