refactor!: migrate to vim.system
This commit is contained in:
parent
837897a79d
commit
ec91e6efcc
5 changed files with 57 additions and 54 deletions
|
|
@ -8,17 +8,23 @@ local function install_plug(plugin)
|
|||
local package_root = root ".tests/site/pack/deps/start/"
|
||||
if not vim.uv.fs_stat(package_root .. name) then
|
||||
print("Installing " .. plugin)
|
||||
vim.fn.mkdir(package_root, "p")
|
||||
vim.fn.system {
|
||||
"git",
|
||||
"clone",
|
||||
"--depth=1",
|
||||
"https://github.com/" .. plugin .. ".git",
|
||||
package_root .. "/" .. name,
|
||||
}
|
||||
vim
|
||||
.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--depth=1",
|
||||
"https://github.com/" .. plugin .. ".git",
|
||||
package_root .. "/" .. name,
|
||||
})
|
||||
:wait()
|
||||
end
|
||||
end
|
||||
|
||||
install_plug "nvim-lua/plenary.nvim"
|
||||
install_plug "nvim-treesitter/nvim-treesitter"
|
||||
install_plug "echasnovski/mini.doc" -- used for docs generation
|
||||
install_plug "echasnovski/mini.test"
|
||||
|
||||
vim.env.XDG_CONFIG_HOME = root ".tests/config"
|
||||
vim.env.XDG_DATA_HOME = root ".tests/data"
|
||||
vim.env.XDG_STATE_HOME = root ".tests/state"
|
||||
|
|
@ -29,11 +35,6 @@ vim.opt.runtimepath:append(root())
|
|||
vim.opt.packpath = { root ".tests/site" }
|
||||
vim.notify = print
|
||||
|
||||
install_plug "nvim-lua/plenary.nvim"
|
||||
install_plug "nvim-treesitter/nvim-treesitter"
|
||||
install_plug "echasnovski/mini.doc" -- used for docs generation
|
||||
install_plug "echasnovski/mini.test"
|
||||
|
||||
-- install go treesitter parse
|
||||
require("nvim-treesitter.install").ensure_installed_sync "go"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue