| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 | local execute = vim.api.nvim_commandlocal fn = vim.fnlocal install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"if fn.empty(fn.glob(install_path)) > 0 then  execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)  execute "packadd packer.nvim"endlocal packer_ok, packer = pcall(require, "packer")if not packer_ok then  returnendpacker.init {  -- package_root = require("packer.util").join_paths(vim.fn.stdpath "data", "lvim", "pack"),  git = { clone_timeout = 300 },  display = {    open_fn = function()      return require("packer.util").float { border = "single" }    end,  },}return require("packer").startup(function(use)  -- Packer can manage itself as an optional plugin  use "wbthomason/packer.nvim"  -- TODO: refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)  use { "neovim/nvim-lspconfig" }  use {    "kabouzeid/nvim-lspinstall",    event = "VimEnter",    config = function()      require("lspinstall").setup()    end,  }  use { "nvim-lua/popup.nvim" }  use { "nvim-lua/plenary.nvim" }  use { "tjdevries/astronauta.nvim" }  -- Telescope  use {    "nvim-telescope/telescope.nvim",    config = [[require('core.telescope').setup()]],  }  -- Autocomplete  use {    "hrsh7th/nvim-compe",    -- event = "InsertEnter",    config = function()      require("core.compe").setup()    end,  }  -- Autopairs  use {    "windwp/nvim-autopairs",    -- event = "InsertEnter",    config = function()      require "core.autopairs"    end,  }  -- Snippets  use { "hrsh7th/vim-vsnip", event = "InsertEnter" }  use { "rafamadriz/friendly-snippets", event = "InsertEnter" }  -- Treesitter  use {    "nvim-treesitter/nvim-treesitter",    config = function()      require("core.treesitter").setup()    end,  }  -- Formatter.nvim  use {    "mhartington/formatter.nvim",    config = function()      require "core.formatter"    end,  }  -- NvimTree  use {    "kyazdani42/nvim-tree.lua",    -- event = "BufWinOpen",    -- cmd = "NvimTreeToggle",    commit = "fd7f60e242205ea9efc9649101c81a07d5f458bb",    config = function()      require("core.nvimtree").setup()    end,  }  use {    "lewis6991/gitsigns.nvim",    config = function()      require("core.gitsigns").setup()    end,    event = "BufRead",  }  -- whichkey  use {    "folke/which-key.nvim",    config = function()      require("core.which-key").setup()    end,    event = "BufWinEnter",  }  -- Comments  use {    "terrortylor/nvim-comment",    event = "BufRead",    config = function()      local status_ok, nvim_comment = pcall(require, "nvim_comment")      if not status_ok then        return      end      nvim_comment.setup()    end,  }  -- vim-rooter  use {    "airblade/vim-rooter",    config = function()      vim.g.rooter_silent_chdir = 1    end,  }  -- Icons  use { "kyazdani42/nvim-web-devicons" }  -- Status Line and Bufferline  use {    "glepnir/galaxyline.nvim",    config = function()      require "core.galaxyline"    end,    event = "BufWinEnter",    disable = not O.plugin.galaxyline.active,  }  use {    "romgrk/barbar.nvim",    config = function()      require "core.bufferline"    end,    event = "BufWinEnter",  }  -- Debugging  use {    "mfussenegger/nvim-dap",    -- event = "BufWinEnter",    config = function()      require("core.dap").setup()    end,    disable = not O.plugin.dap.active,  }  -- Debugger management  use {    "Pocco81/DAPInstall.nvim",    -- event = "BufWinEnter",    -- event = "BufRead",    disable = not O.plugin.dap.active,  }  -- Builtins, these do not load by default  -- Dashboard  use {    "ChristianChiarulli/dashboard-nvim",    event = "BufWinEnter",    config = function()      require("core.dashboard").setup()    end,    disable = not O.plugin.dashboard.active,  }  -- TODO: remove in favor of akinsho/nvim-toggleterm.lua  -- Floating terminal  use {    "numToStr/FTerm.nvim",    event = "BufWinEnter",    config = function()      require("core.floatterm").setup()    end,    disable = not O.plugin.floatterm.active,  }  -- Zen Mode  use {    "folke/zen-mode.nvim",    cmd = "ZenMode",    event = "BufRead",    config = function()      require("core.zen").setup()    end,    disable = not O.plugin.zen.active,  }  ---------------------------------------------------------------------------------  -- LANGUAGE SPECIFIC GOES HERE  use {    "lervag/vimtex",    ft = "tex",  }  -- Rust tools  -- TODO: use lazy loading maybe?  use {    "simrat39/rust-tools.nvim",    disable = not O.lang.rust.rust_tools.active,  }  -- Elixir  use { "elixir-editors/vim-elixir", ft = { "elixir", "eelixir", "euphoria3" } }  -- Javascript / Typescript  use {    "jose-elias-alvarez/nvim-lsp-ts-utils",    ft = {      "javascript",      "javascriptreact",      "javascript.jsx",      "typescript",      "typescriptreact",      "typescript.tsx",    },  }  use {    "mfussenegger/nvim-jdtls",    -- ft = { "java" },    disable = not O.lang.java.java_tools.active,  }  -- Install user plugins  for _, plugin in pairs(O.user_plugins) do    packer.use(plugin)  endend)
 |