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://github.com/folke/lazy.nvim.git',
    '--branch=stable', -- latest stable release
    lazypath,
  }
end
vim.opt.rtp:prepend(lazypath)

local status_ok, lazy = pcall(require, 'lazy')
if not status_ok then
  print 'lazy just installed, please restart neovim'
  return
end

local lazy_opts = {
  lockfile = vim.fn.stdpath 'config' .. '/lua/lazy-lock.json',
  ui = {
    border = 'single',
  },
  performance = {
    rtp = {
      disabled_plugins = {
        'man',
        'gzip',
        'zip',
        'zipPlugin',
        'tar',
        'tarPlugin',
        'getscript',
        'getscriptPlugin',
        'vimball',
        'vimballPlugin',
        '2html_plugin',
        'tohtml',
        'logiPat',
        'rrhelper',
        'netrw',
        'netrwPlugin',
        'netrwSettings',
        'netrwFileHandlers',
        'tutor',
        'rplugin',
        'optwin',
        'compiler',
      },
    },
  },
}

lazy.setup('vago', lazy_opts)
