Skip to content

国内用户建议使用 ghproxy 加快插件安装速度 #22

@jonahfang

Description

@jonahfang

例如:

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",
    "https://ghproxy.com/https://github.com/folke/lazy.nvim.git",
    "--branch=v10.4.1",
    lazypath,
  })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

require("lazy").setup({
	spec = {
	...
	},
    git = {
      url_format = "https://ghproxy.com/https://github.com/%s"
    },
	performance = {
		rtp = {
			-- disable some rtp plugins
			disabled_plugins = {
               "2html_plugin",
               "getscript",
               "getscriptPlugin",
               "gzip",
               "logipat",
               "netrw",
               "netrwPlugin",
               "netrwSettings",
               "netrwFileHandlers",
               "matchit",
               "tar",
               "tarPlugin",
               "rrhelper",
               "spellfile_plugin",
               "vimball",
               "vimballPlugin",
               "zip",
               "zipPlugin",
               "tutor",
               "rplugin",
               "synmenu",
               "optwin",
               "compiler",
               "bugreport",
               "ftplugin",
			},
		},
	},
})
-- EOF

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions