refactor: 重构Neovim配置结构并更新文档
- 调整配置文件组织方式,新增init.lua作为入口 - 更新lazy-lock.json同步插件版本 - 完善lua/目录下的插件和配置模块结构 - 修改README.md补充配置说明和使用指南
This commit is contained in:
15
lua/config/lazy.lua
Normal file
15
lua/config/lazy.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "git@github.com:folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
Reference in New Issue
Block a user