为 LazyVim 设置 github 镜像
最近 ghproxy 复活了,正好 LazyVim 会频繁地用到 github,于是就给它设置了镜像.
翻阅 LazyVim 的文档 发现它使用 lazy.nvim 作为插件管理器,翻阅 lazy.nvim 文档 发现直接修改 git 对应的配置即可.
于是打开 ~/.config/nvim/lua/config/lazy.lua ,在里面加几行:
-- ...
+ local ghproxy = "https://ghfast.top/"
require("lazy").setup({
+    git = {
+        url_format = ghproxy .. "https://github.com/%s.git",
+    },
    spec = {
        -- add LazyVim and import its plugins
        { "LazyVim/LazyVim", import = "lazyvim.plugins" },
        -- import/override with your plugins
        { import = "plugins" },
    },
    -- ...
重启时会重新安装所有插件,然后搞定.

 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号