-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
34 lines (31 loc) · 941 Bytes
/
init.lua
File metadata and controls
34 lines (31 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
-- bootstrap mini.nvim manually so 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
-- global config table
_G.Config = {
mini = {
-- default path for mini.deps to save snapshots
snapshot = vim.fn.stdpath("config") .. "/snapshot",
},
}
-- setup mini.deps immediately to use in during plugin config
local deps = require("mini.deps")
deps.setup({
path = {
snapshot = Config.mini.snapshot,
},
})
-- custom `now` or `later` helper
_G.Config.now_if_args = vim.fn.argc(-1) > 0 and deps.now or deps.later