lazy.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. -- Bootstrap lazy.nvim
  2. local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
  3. if not (vim.uv or vim.loop).fs_stat(lazypath) then
  4. local lazyrepo = "https://github.com/folke/lazy.nvim.git"
  5. local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
  6. if vim.v.shell_error ~= 0 then
  7. vim.api.nvim_echo({
  8. { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
  9. { out, "WarningMsg" },
  10. { "\nPress any key to exit..." },
  11. }, true, {})
  12. vim.fn.getchar()
  13. os.exit(1)
  14. end
  15. end
  16. vim.opt.rtp:prepend(lazypath)
  17. -- Make sure to setup `mapleader` and `maplocalleader` before
  18. -- loading lazy.nvim so that mappings are correct.
  19. -- This is also a good place to setup other settings (vim.opt)
  20. vim.g.mapleader = " "
  21. vim.g.maplocalleader = "\\"
  22. -- Setup lazy.nvim
  23. require("lazy").setup({
  24. spec = {
  25. -- import your plugins
  26. { import = "plugins" },
  27. },
  28. -- Configure any other settings here. See the documentation for more details.
  29. -- colorscheme that will be used when installing plugins.
  30. install = { colorscheme = { "habamax" } },
  31. -- automatically check for plugin updates
  32. checker = { enabled = true, notify = false },
  33. })