init.lua 866 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/"
  2. vim.g.mapleader = " "
  3. -- bootstrap lazy and all plugins
  4. local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
  5. if not vim.loop.fs_stat(lazypath) then
  6. local repo = "https://github.com/folke/lazy.nvim.git"
  7. vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
  8. end
  9. vim.opt.rtp:prepend(lazypath)
  10. local lazy_config = require "configs.lazy"
  11. -- load plugins
  12. require("lazy").setup({
  13. {
  14. "NvChad/NvChad",
  15. lazy = false,
  16. branch = "v2.5",
  17. import = "nvchad.plugins",
  18. config = function()
  19. require "options"
  20. end,
  21. },
  22. { import = "plugins" },
  23. }, lazy_config)
  24. -- load theme
  25. dofile(vim.g.base46_cache .. "defaults")
  26. dofile(vim.g.base46_cache .. "statusline")
  27. require "nvchad.autocmds"
  28. vim.schedule(function()
  29. require "mappings"
  30. end)