123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- return {
- -- Packer can manage itself as an optional plugin
- { "wbthomason/packer.nvim" },
- -- TODO: refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)
- { "neovim/nvim-lspconfig" },
- {
- "kabouzeid/nvim-lspinstall",
- event = "VimEnter",
- config = function()
- local lspinstall = require "lspinstall"
- lspinstall.setup()
- if O.plugin.lspinstall.on_config_done then
- O.plugin.lspinstall.on_config_done(lspinstall)
- end
- end,
- },
- { "nvim-lua/popup.nvim" },
- { "nvim-lua/plenary.nvim" },
- { "tjdevries/astronauta.nvim" },
- -- Telescope
- {
- "nvim-telescope/telescope.nvim",
- config = function()
- require("core.telescope").setup()
- if O.plugin.telescope.on_config_done then
- O.plugin.telescope.on_config_done(require "telescope")
- end
- end,
- },
- -- Autocomplete
- {
- "hrsh7th/nvim-compe",
- -- event = "InsertEnter",
- config = function()
- require("core.compe").setup()
- if O.plugin.compe.on_config_done then
- O.plugin.compe.on_config_done(require "compe")
- end
- end,
- },
- -- Autopairs
- {
- "windwp/nvim-autopairs",
- -- event = "InsertEnter",
- config = function()
- require "core.autopairs"
- if O.plugin.autopairs.on_config_done then
- O.plugin.autopairs.on_config_done(require "nvim-autopairs")
- end
- end,
- },
- -- Snippets
- { "hrsh7th/vim-vsnip", event = "InsertEnter" },
- { "rafamadriz/friendly-snippets", event = "InsertEnter" },
- -- Treesitter
- {
- "nvim-treesitter/nvim-treesitter",
- config = function()
- require("core.treesitter").setup()
- if O.plugin.treesitter.on_config_done then
- O.plugin.treesitter.on_config_done(require "nvim-treesitter.configs")
- end
- end,
- },
- -- Formatter.nvim
- {
- "mhartington/formatter.nvim",
- config = function()
- require "core.formatter"
- if O.plugin.formatter.on_config_done then
- O.plugin.formatter.on_config_done(require "formatter")
- end
- end,
- },
- -- Linter
- {
- "mfussenegger/nvim-lint",
- config = function()
- require("core.linter").setup()
- if O.plugin.lint.on_config_done then
- O.plugin.lint.on_config_done(require "lint")
- end
- end,
- },
- -- NvimTree
- {
- "kyazdani42/nvim-tree.lua",
- -- event = "BufWinOpen",
- -- cmd = "NvimTreeToggle",
- -- commit = "fd7f60e242205ea9efc9649101c81a07d5f458bb",
- config = function()
- require("core.nvimtree").setup()
- if O.plugin.nvimtree.on_config_done then
- O.plugin.nvimtree.on_config_done(require "nvim-tree.config")
- end
- end,
- },
- {
- "lewis6991/gitsigns.nvim",
- config = function()
- require("core.gitsigns").setup()
- if O.plugin.gitsigns.on_config_done then
- O.plugin.gitsigns.on_config_done(require "gitsigns")
- end
- end,
- event = "BufRead",
- },
- -- whichkey
- {
- "folke/which-key.nvim",
- config = function()
- require("core.which-key").setup()
- if O.plugin.which_key.on_config_done then
- O.plugin.which_key.on_config_done(require "which-key")
- end
- end,
- event = "BufWinEnter",
- },
- -- Comments
- {
- "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()
- if O.plugin.comment.on_config_done then
- O.plugin.comment.on_config_done(nvim_comment)
- end
- end,
- },
- -- vim-rooter
- {
- "airblade/vim-rooter",
- config = function()
- vim.g.rooter_silent_chdir = 1
- if O.plugin.rooter.on_config_done then
- O.plugin.rooter.on_config_done()
- end
- end,
- },
- -- Icons
- { "kyazdani42/nvim-web-devicons" },
- -- Status Line and Bufferline
- {
- "glepnir/galaxyline.nvim",
- config = function()
- require "core.galaxyline"
- if O.plugin.galaxyline.on_config_done then
- O.plugin.galaxyline.on_config_done(require "galaxyline")
- end
- end,
- event = "BufWinEnter",
- disable = not O.plugin.galaxyline.active,
- },
- {
- "romgrk/barbar.nvim",
- config = function()
- require "core.bufferline"
- if O.plugin.bufferline.on_config_done then
- O.plugin.bufferline.on_config_done()
- end
- end,
- event = "BufWinEnter",
- },
- -- Debugging
- {
- "mfussenegger/nvim-dap",
- -- event = "BufWinEnter",
- config = function()
- require("core.dap").setup()
- if O.plugin.dap.on_config_done then
- O.plugin.dap.on_config_done(require "dap")
- end
- end,
- disable = not O.plugin.dap.active,
- },
- -- Debugger management
- {
- "Pocco81/DAPInstall.nvim",
- -- event = "BufWinEnter",
- -- event = "BufRead",
- disable = not O.plugin.dap.active,
- },
- -- Builtins, these do not load by default
- -- Dashboard
- {
- "ChristianChiarulli/dashboard-nvim",
- event = "BufWinEnter",
- config = function()
- require("core.dashboard").setup()
- if O.plugin.dashboard.on_config_done then
- O.plugin.dashboard.on_config_done(require "dashboard")
- end
- end,
- disable = not O.plugin.dashboard.active,
- },
- -- TODO: remove in favor of akinsho/nvim-toggleterm.lua
- -- Floating terminal
- -- {
- -- "numToStr/FTerm.nvim",
- -- event = "BufWinEnter",
- -- config = function()
- -- require("core.floatterm").setup()
- -- end,
- -- disable = not O.plugin.floatterm.active,
- -- },
- {
- "akinsho/nvim-toggleterm.lua",
- event = "BufWinEnter",
- config = function()
- require("core.terminal").setup()
- if O.plugin.terminal.on_config_done then
- O.plugin.terminal.on_config_done(require "toggleterm")
- end
- end,
- disable = not O.plugin.terminal.active,
- },
- -- Zen Mode
- {
- "folke/zen-mode.nvim",
- cmd = "ZenMode",
- event = "BufRead",
- config = function()
- require("core.zen").setup()
- if O.plugin.zen.on_config_done then
- O.plugin.zen.on_config_done(require "zen-mode")
- end
- end,
- disable = not O.plugin.zen.active,
- },
- ---------------------------------------------------------------------------------
- -- LANGUAGE SPECIFIC GOES HERE
- {
- "lervag/vimtex",
- ft = "tex",
- },
- -- Rust tools
- -- TODO: use lazy loading maybe?
- {
- "simrat39/rust-tools.nvim",
- disable = not O.lang.rust.rust_tools.active,
- },
- -- Elixir
- { "elixir-editors/vim-elixir", ft = { "elixir", "eelixir", "euphoria3" } },
- -- Javascript / Typescript
- {
- "jose-elias-alvarez/nvim-lsp-ts-utils",
- ft = {
- "javascript",
- "javascriptreact",
- "javascript.jsx",
- "typescript",
- "typescriptreact",
- "typescript.tsx",
- },
- },
- -- Java
- {
- "mfussenegger/nvim-jdtls",
- -- ft = { "java" },
- disable = not O.lang.java.java_tools.active,
- },
- -- Scala
- {
- "scalameta/nvim-metals",
- disable = not O.lang.scala.metals.active,
- },
- }
|