diff options
Diffstat (limited to 'ar/.config/NvChad/init.lua')
| -rw-r--r-- | ar/.config/NvChad/init.lua | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/ar/.config/NvChad/init.lua b/ar/.config/NvChad/init.lua index 21f0b6f..494360c 100644 --- a/ar/.config/NvChad/init.lua +++ b/ar/.config/NvChad/init.lua @@ -1,21 +1,37 @@ -require "core" +vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" +vim.g.mapleader = " " -local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1] +-- bootstrap lazy and all plugins +local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" -if custom_init_path then - dofile(custom_init_path) +if not vim.uv.fs_stat(lazypath) then + local repo = "https://github.com/folke/lazy.nvim.git" + vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } end -require("core.utils").load_mappings() +vim.opt.rtp:prepend(lazypath) -local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" +local lazy_config = require "configs.lazy" --- bootstrap lazy.nvim! -if not vim.loop.fs_stat(lazypath) then - require("core.bootstrap").gen_chadrc_template() - require("core.bootstrap").lazy(lazypath) -end +-- load plugins +require("lazy").setup({ + { + "NvChad/NvChad", + lazy = false, + branch = "v2.5", + import = "nvchad.plugins", + }, + { import = "plugins" }, +}, lazy_config) + +-- load theme dofile(vim.g.base46_cache .. "defaults") -vim.opt.rtp:prepend(lazypath) -require "plugins" +dofile(vim.g.base46_cache .. "statusline") + +require "options" +require "autocmds" + +vim.schedule(function() + require "mappings" +end) |
