local fn = vim.fn local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" if fn.empty(fn.glob(install_path)) > 0 then PACKER_BOOTSTRAP = fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path, }) vim.cmd("packadd packer.nvim") end vim.cmd([[ augroup packer_user_config autocmd! autocmd BufWritePost packer.lua source | PackerSync augroup end ]]) vim.api.nvim_create_autocmd("User", { pattern = "PackerCompileDone", callback = function() vim.cmd("CatppuccinCompile") vim.defer_fn(function() require("plugins.configs.catppuccin") end, 0) end, }) local packer = require("packer") packer.init({ display = { open_fn = function() return require("packer.util").float({ border = "rounded" }) end, }, profile = { enable = true, threshold = 0, }, auto_reload_compiled = true, }) return packer.startup(function(use) use("wbthomason/packer.nvim") -- Dependencies use({ "MunifTanjim/nui.nvim", module = "nui", }) use({ "nvim-lua/plenary.nvim", module = "plenary", }) use({ "kyazdani42/nvim-web-devicons", module = "nvim-web-devicons", }) -- Benchmark Startup use({ "dstein64/vim-startuptime", cmd = "StartupTime", }) -- Plugin Module Caching use("lewis6991/impatient.nvim") -- Alpha Dashboard use({ "goolord/alpha-nvim", config = function() require("plugins.configs.alpha") end, }) -- Colorscheme use({ "catppuccin/nvim", config = function() require("plugins.configs.catppuccin") end, }) -- File Tree use({ "nvim-neo-tree/neo-tree.nvim", ft = "alpha", cmd = { "Neotree" }, config = function() require("plugins.configs.neotree") end, }) -- Treesitter use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate", event = "BufReadPre", config = function() require("plugins.configs.treesitter") end, }) use({ "p00f/nvim-ts-rainbow", after = "nvim-treesitter", }) use({ "JoosepAlviste/nvim-ts-context-commentstring", after = "nvim-treesitter", }) use({ "SmiteshP/nvim-gps", after = "nvim-treesitter", }) -- Telescope use({ "nvim-telescope/telescope.nvim", cmd = "Telescope", config = function() require("plugins.configs.telescope") end, }) use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make", module = "telescope._extensions.fzf", }) use({ "nvim-telescope/telescope-dap.nvim", module = "telescope._extensions.dap", }) -- CMP use({ "hrsh7th/nvim-cmp", event = "InsertEnter", config = function() require("plugins.configs.cmp") end, }) use({ "hrsh7th/cmp-nvim-lsp", after = "nvim-cmp", }) use({ "hrsh7th/cmp-path", after = "nvim-cmp", }) use({ "hrsh7th/cmp-nvim-lua", after = "nvim-cmp", }) use({ "hrsh7th/vim-vsnip", after = "nvim-cmp", }) use({ "hrsh7th/cmp-vsnip", after = "nvim-cmp", }) use({ "rafamadriz/friendly-snippets", after = "nvim-cmp", }) use({ "hrsh7th/cmp-buffer", after = "nvim-cmp", }) -- Terminal use({ "akinsho/toggleterm.nvim", keys = [[]], config = function() require("plugins.configs.toggleterm") end, }) -- LSP use({ "neovim/nvim-lspconfig", event = "BufReadPre", config = function() require("plugins.configs.lsp") end, }) use({ "onsails/lspkind.nvim", module = "lspkind", }) use({ "williamboman/mason.nvim", module = "mason", }) use({ "williamboman/mason-lspconfig.nvim", module = "mason-lspconfig", }) use({ "glepnir/lspsaga.nvim", module = "lspsaga", }) use({ "RRethy/vim-illuminate", module = "illuminate", }) use({ "SmiteshP/nvim-navic", module = "nvim-navic", }) use({ "tamago324/nlsp-settings.nvim", module = "nlspsettings", }) use({ "b0o/SchemaStore.nvim", module = "schemastore", }) use({ "jose-elias-alvarez/null-ls.nvim", module = "null-ls", }) use({ "ray-x/lsp_signature.nvim", module = "lsp_signature", }) use({ "Maan2003/lsp_lines.nvim", module = "lsp_lines", }) -- Statusline use({ "nvim-lualine/lualine.nvim", config = function() require("plugins.configs.lualine") end, }) -- Autopairs use({ "windwp/nvim-autopairs", event = "InsertEnter", config = function() require("plugins.configs.autopairs") end, }) -- Discord Presence use({ "andweeb/presence.nvim", event = "BufReadPre", }) -- WhichKey use({ "folke/which-key.nvim", event = "BufReadPre", config = function() require("which-key").setup({}) end, }) -- Rust tooling use({ "simrat39/rust-tools.nvim", event = "BufReadPre", config = function() require("plugins.configs.rust-tools") end, }) use({ "Saecki/crates.nvim", event = { "BufRead Cargo.toml" }, config = function() require("crates").setup() end, }) -- Bufferline use({ "akinsho/bufferline.nvim", config = function() require("plugins.configs.bufferline") end }) use({ "moll/vim-bbye", after = "bufferline.nvim" }) if PACKER_BOOTSTRAP then require("packer").sync() end end)