Skip to content

Commit

Permalink
perf(entry): assure lazy being installed at entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnwriter committed Aug 11, 2024
1 parent 5dc7c8d commit b255edf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 13 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@ vim.loader.enable()
require("core.opts").initial()

local lazy_path = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
local lazy_url = "https://github.com/folke/lazy.nvim"

require("core.utils").bootstrap(lazy_path)
if not vim.uv.fs_stat(lazy_path) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"--branch=stable",
lazy_url,
lazy_path,
}
end

vim.opt.rtp:prepend(lazy_path)

require "plugins"
12 changes: 0 additions & 12 deletions lua/core/utils.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
local M = {}

M.bootstrap = function(lazy_path)
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazy_path,
}
vim.opt.rtp:prepend(lazy_path)
end

local cmds = { "nu!", "rnu!", "nonu!" }
local current_index = 1

Expand Down

0 comments on commit b255edf

Please sign in to comment.