lazy.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
  5. if vim.v.shell_error ~= 0 then
  6. vim.api.nvim_echo({
  7. { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
  8. { out, "WarningMsg" },
  9. { "\nPress any key to exit..." },
  10. }, true, {})
  11. vim.fn.getchar()
  12. os.exit(1)
  13. end
  14. end
  15. vim.opt.rtp:prepend(lazypath)
  16. require("lazy").setup({
  17. spec = {
  18. -- add LazyVim and import its plugins
  19. { "LazyVim/LazyVim", import = "lazyvim.plugins" },
  20. -- import/override with your plugins
  21. { import = "plugins" },
  22. { import = "plugins.rust" },
  23. { import = "plugins.cpp" },
  24. },
  25. defaults = {
  26. -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
  27. -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
  28. lazy = false,
  29. -- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
  30. -- have outdated releases, which may break your Neovim install.
  31. version = false, -- always use the latest git commit
  32. -- version = "*", -- try installing the latest stable version for plugins that support semver
  33. },
  34. install = { colorscheme = { "tokyonight", "habamax" } },
  35. checker = {
  36. enabled = true, -- check for plugin updates periodically
  37. notify = false, -- notify on update
  38. }, -- automatically check for plugin updates
  39. performance = {
  40. rtp = {
  41. -- disable some rtp plugins
  42. disabled_plugins = {
  43. "gzip",
  44. -- "matchit",
  45. -- "matchparen",
  46. -- "netrwPlugin",
  47. "tarPlugin",
  48. "tohtml",
  49. "tutor",
  50. "zipPlugin",
  51. },
  52. },
  53. },
  54. })