nvim-config/lua/lazynvim-init.lua
2024-06-08 12:17:10 +08:00

21 lines
576 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"git@github.com:folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
--
-- 2. 将 lazypath 设置为运行时路径
-- rtpruntime path
-- nvim进行路径搜索的时候除已有的路径还会从prepend的路径中查找
-- 否则,下面 require("lazy") 是找不到的
vim.opt.rtp:prepend(lazypath)
-- 3. 加载lazy.nvim模块
require("lazy").setup("plugins")