vim.cmd "packadd packer.nvim" local plugins = { ["nvim-lua/plenary.nvim"] = { module = "plenary", module_pattern = "plenary*", }, ["wbthomason/packer.nvim"] = { cmd = require("core.lazy_load").packer_cmds, config = function() require "plugins" end, }, ["NvChad/extensions"] = { module = { "telescope", "nvchad" }, lock = true }, ["NvChad/base46"] = { lock = false, config = function() local ok, base46 = pcall(require, "base46") if ok then base46.load_theme() end end, }, ["NvChad/ui"] = { lock = true, disable = false, after = "base46", config = function() require("plugins.configs.others").nvchad_ui() end, }, ["NvChad/nvterm"] = { module = "nvterm", config = function() require "plugins.configs.nvterm" end, setup = function() require("core.utils").load_mappings "nvterm" end, }, ["kyazdani42/nvim-web-devicons"] = { after = "ui", module = "nvim-web-devicons", config = function() require("plugins.configs.others").devicons() end, }, ["lukas-reineke/indent-blankline.nvim"] = { lock = true, opt = true, setup = function() require("core.lazy_load").on_file_open "indent-blankline.nvim" require("core.utils").load_mappings "blankline" end, config = function() require("plugins.configs.others").blankline() end, }, ["NvChad/nvim-colorizer.lua"] = { lock = true, opt = true, setup = function() require("core.lazy_load").on_file_open "nvim-colorizer.lua" end, config = function() require("plugins.configs.others").colorizer() end, }, ["nvim-treesitter/nvim-treesitter"] = { module = "nvim-treesitter", setup = function() require("core.lazy_load").on_file_open "nvim-treesitter" end, cmd = require("core.lazy_load").treesitter_cmds, run = ":TSUpdate", config = function() require "plugins.configs.treesitter" end, }, -- lsp stuff ["williamboman/mason.nvim"] = { cmd = require("core.lazy_load").mason_cmds, config = function() require "plugins.configs.mason" end, }, ["neovim/nvim-lspconfig"] = { opt = true, setup = function() require("core.lazy_load").on_file_open "nvim-lspconfig" end, -- config = function() -- require "plugins.configs.lspconfig" -- end, }, -- load luasnips + cmp related in insert mode only ["rafamadriz/friendly-snippets"] = { module = { "cmp", "cmp_nvim_lsp" }, event = "InsertEnter", }, ["hrsh7th/nvim-cmp"] = { after = "friendly-snippets", config = function() require "plugins.configs.cmp" end, }, ["L3MON4D3/LuaSnip"] = { wants = "friendly-snippets", after = "nvim-cmp", config = function() require("plugins.configs.others").luasnip() end, }, ["saadparwaiz1/cmp_luasnip"] = { after = "LuaSnip", }, ["hrsh7th/cmp-nvim-lsp"] = { after = {"nvim-cmp"}, }, ["hrsh7th/cmp-buffer"] = { after = "cmp-nvim-lsp", }, ["hrsh7th/cmp-path"] = { after = "cmp-buffer", }, -- misc plugins ["windwp/nvim-autopairs"] = { after = "nvim-cmp", config = function() require("plugins.configs.others").autopairs() end, }, ["goolord/alpha-nvim"] = { after = "base46", disable = true, config = function() require "plugins.configs.alpha" end, }, ["numToStr/Comment.nvim"] = { module = "Comment", keys = { "gc", "gb" }, config = function() require("plugins.configs.others").comment() end, setup = function() require("core.utils").load_mappings "comment" end, }, -- file managing , picker etc ["kyazdani42/nvim-tree.lua"] = { commit = "9e87ee2", ft = "alpha", cmd = { "NvimTreeToggle", "NvimTreeFocus" }, config = function() require "plugins.configs.nvimtree" end, setup = function() require("core.utils").load_mappings "nvimtree" end, }, ["nvim-telescope/telescope.nvim"] = { cmd = "Telescope", module = {"telescope"}, config = function() require "plugins.configs.telescope" end, setup = function() require("core.utils").load_mappings "telescope" end, }, -- Only load whichkey after all the gui ["folke/which-key.nvim"] = { disable = true, module = "which-key", keys = {""}, config = function() require "plugins.configs.whichkey" end, setup = function() require("core.utils").load_mappings "whichkey" end, }, -- Speed up deffered plugins ["lewis6991/impatient.nvim"] = {}, } require("core.packer").run(plugins)