mirror of
https://github.com/Cian-H/my_nvim_config.git
synced 2026-08-18 23:32:48 +01:00
Further migration of expressive functionality to fennel
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
local M = {}
|
||||
|
||||
-- Helper function to ensure core bootstrapping plugins are installed
|
||||
function M.ensure_plugin(name, repo, branch)
|
||||
local path = vim.fn.stdpath("data") .. "/lazy/" .. name
|
||||
if not (vim.uv or vim.loop).fs_stat(path) then
|
||||
local cmd = {
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/" .. repo .. ".git",
|
||||
}
|
||||
if branch then
|
||||
table.insert(cmd, "--branch=" .. branch)
|
||||
end
|
||||
table.insert(cmd, path)
|
||||
vim.fn.system(cmd)
|
||||
end
|
||||
return path
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user