lazy.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
  2. if not (vim.uv or vim.loop).fs_stat(lazypath) then
  3. local lazyrepo = "https://github.com/folke/lazy.nvim.git"
  4. local out = vim.fn.system({
  5. "git",
  6. "clone",
  7. "--filter=blob:none",
  8. "--branch=stable",
  9. lazyrepo,
  10. lazypath,
  11. })
  12. if vim.v.shell_error ~= 0 then
  13. vim.api.nvim_echo({
  14. { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
  15. { out, "WarningMsg" },
  16. { "\nPress any key to exit..." },
  17. }, true, {})
  18. vim.fn.getchar()
  19. os.exit(1)
  20. end
  21. end
  22. vim.opt.rtp:prepend(lazypath)
  23. require("lazy").setup({
  24. spec = {
  25. { import = "config.plugins" },
  26. },
  27. performance = {
  28. rtp = {
  29. disabled_plugins = {
  30. "gzip",
  31. "netrwPlugin",
  32. "tarPlugin",
  33. "tohtml",
  34. "tutor",
  35. "zipPlugin",
  36. },
  37. },
  38. },
  39. change_detection = {
  40. notify = false,
  41. enable = true,
  42. },
  43. ui = {
  44. border = "rounded",
  45. size = {
  46. width = 0.8,
  47. height = 0.8,
  48. },
  49. },
  50. })
  51. nmap("<leader>la", ":Lazy<CR>", { desc = "Open Lazy" })