local fn,api = vim.fn,vim.api local packer_dir = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim' if fn.empty(fn.glob(packer_dir)) > 0 then fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_dir}) api.nvim_command('packadd packer.nvim') end -- Require since we use 'packer' as opt vim.cmd [[packadd packer.nvim]] return require('packer').startup( function(use) use {'wbthomason/packer.nvim', opt = true} -------- -- UI -- -------- local ui = require('modules.ui') use { 'glepnir/dashboard-nvim', cmd = { 'Dashboard', 'DashboardNewFile', 'DashboardFindFile', 'DashboardFindHistory', 'DashboardFindWord', 'DashboardJumpMark', 'SessionLoad', 'SessionSave' }, setup = ui.dashboard_conf } use { -- TODO: consider moving to felline.nvim 'glepnir/galaxyline.nvim', branch = 'main', requires = 'kyazdani42/nvim-web-devicons', config = ui.statusline_conf } use { 'akinsho/nvim-bufferline.lua', event = 'BufRead', config = ui.bufferline_conf } use { 'kyazdani42/nvim-tree.lua', cmd = 'NvimTreeToggle', setup = ui.nvimtree_conf } use { 'folke/which-key.nvim', config = ui.whichkey_conf } use { 'lewis6991/gitsigns.nvim', event = {'BufRead', 'BufNewFile'}, wants = 'plenary.nvim', requires = {{'nvim-lua/plenary.nvim', opt = true}}, config = ui.gitsigns_conf } ------------ -- Editor -- ------------ local editor = require('modules.editor') use { 'norcalli/nvim-colorizer.lua', cmd = 'ColorizerToggle', config = editor.colorizer_conf } use { 'RRethy/vim-illuminate', event = {'BufReadPre', 'BufNewFile'} } use { 'lukas-reineke/indent-blankline.nvim', event = 'BufRead', config = editor.blankline_conf } use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', event = 'BufRead', config = editor.treesitter_conf } use { 'p00f/nvim-ts-rainbow', after = 'nvim-treesitter', -- Putting config into `treesitter_conf` doesn't work for some reason config = editor.rainbow_conf } use { 'romgrk/nvim-treesitter-context', after = 'nvim-treesitter' } use { 'nvim-treesitter/nvim-treesitter-textobjects', after = 'nvim-treesitter' } use { 'andymass/vim-matchup', after = 'nvim-treesitter', config = editor.matchup_conf } use { 'machakann/vim-sandwich', keys = {'sa', 'sd', 'sr'} } use { 'phaazon/hop.nvim', cmd = {'HopChar1', 'HopChar2', 'HopWord', 'HopPattern', 'HopLine'}, config = editor.hop_conf } use { 'junegunn/vim-easy-align', cmd = 'EasyAlign' } use { 'terrortylor/nvim-comment', keys = 'gc', config = editor.comment_conf } --------- -- LSP -- --------- local lsp = require('modules.lsp') use { 'neovim/nvim-lspconfig', event = 'BufReadPre', config = lsp.lsp_conf } use { 'nanotee/sqls.nvim', ft = {'sql', 'mysql', 'plsql'}, wants = 'nvim-lspconfig', config = lsp.sqls_conf } use { 'ray-x/lsp_signature.nvim', after = 'nvim-lspconfig' } use { 'ahmedkhalf/lsp-rooter.nvim', after = 'nvim-lspconfig' } use { 'folke/trouble.nvim', cmd = {'Trouble', 'TroubleToggle', 'TroubleRefresh'}, config = lsp.trouble_conf } use { 'simrat39/symbols-outline.nvim', cmd = {'SymbolsOutline', 'SymbolsOutlineOpen'}, setup = lsp.outline_conf } ---------------- -- Completion -- ---------------- local completion = require('modules.completion') use { 'hrsh7th/nvim-cmp', event = 'InsertEnter', wants = {'LuaSnip'}, requires = { { 'L3MON4D3/LuaSnip', wants = 'friendly-snippets', requires = {{'rafamadriz/friendly-snippets', opt = true}}, config = completion.snippets_conf, opt = true }, {'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp', opt = true}, {'hrsh7th/cmp-path', after = 'nvim-cmp', opt = true}, {'hrsh7th/cmp-buffer', after = 'nvim-cmp', opt = true}, -- {'hrsh7th/cmp-calc', after = 'nvim-cmp', opt = true}, -- {'f3fora/cmp-nuspell', after = 'nvim-cmp', rocks={'lua-nuspell'}, opt = true}, {'f3fora/cmp-spell', after = 'nvim-cmp', opt = true}, {'hrsh7th/cmp-emoji', after = 'nvim-cmp', opt = true}, {'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp', opt = true}, {'kdheepak/cmp-latex-symbols', after = 'nvim-cmp', opt = true}, {'andersevenrud/compe-tmux', after = 'nvim-cmp', branch = 'cmp', opt = true} }, config = completion.cmp_conf } use { 'windwp/nvim-autopairs', after = 'nvim-cmp', config = completion.autopairs_conf } -- use { -- 'ms-jpq/coq_nvim', -- branch = 'coq', -- event = 'InsertEnter', -- run = ':COQdeps', -- wants = 'coq.artifacts', -- requires = {{'ms-jpq/coq.artifacts', branch = 'artifacts', opt = true}}, -- setup = completion.coq_conf -- } use { 'windwp/nvim-ts-autotag', ft = { 'html', 'xml', 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'vue', 'svelte', 'php' }, wants = 'nvim-treesitter', config = completion.autotag_conf } ----------- -- Tools -- ----------- local tools = require('modules.tools') use { 'nvim-telescope/telescope.nvim', cmd = 'Telescope', wants = { 'popup.nvim', 'plenary.nvim', 'telescope-symbols.nvim', 'telescope-project.nvim', 'telescope-fzf-native.nvim' }, requires = { {'nvim-lua/popup.nvim', opt = true}, {'nvim-lua/plenary.nvim', opt = true}, {'nvim-telescope/telescope-symbols.nvim', opt = true}, {'nvim-telescope/telescope-project.nvim', opt = true}, {'nvim-telescope/telescope-fzf-native.nvim', run = 'make', opt = true} }, config = tools.telescope_conf } use { -- Telescope file browser doesn't support dotfiles 'mcchrish/nnn.vim', cmd = 'NnnPicker', config = tools.nnn_conf } use { -- TODO: colors + config 'pwntester/octo.nvim', cmd = 'Octo', wants = 'telescope.nvim', config = tools.octo_conf } use { 'TimUntersberger/neogit', cmd = 'Neogit', wants = { 'diffview.nvim', 'plenary.nvim' }, requires = { {'nvim-lua/plenary.nvim', opt = true}, { 'sindrets/diffview.nvim', config = function() require('diffview').setup { diff_binaries = true } end, opt = true } }, config = tools.neogit_conf } use { 'iamcco/markdown-preview.nvim', run = 'cd app && yarn install', ft = {'markdown', 'pandoc.markdown', 'rmd'}, config = tools.markdown_preview_conf } use { 'turbio/bracey.vim', run = 'npm install --prefix server', cmd = 'Bracey' } use { 'folke/zen-mode.nvim', cmd = 'ZenMode', wants = 'twilight.nvim', requires = {{'folke/twilight.nvim', opt = true}}, config = tools.zenmode_conf } use { -- shouldn't be lazy-loaded (global bindings don't work) 'kristijanhusak/orgmode.nvim', ft = {'org'}, config = tools.orgmode_conf } use { 'echuraev/translate-shell.vim', cmd = {'Trans', 'TransSelectDirection'}, config = tools.translate_conf } use { 'akinsho/nvim-toggleterm.lua', cmd = 'ToggleTerm', config = tools.toggleterm_conf } -- use { -- 'gelguy/wilder.nvim', -- run = ':UpdateRemotePlugins', -- event = 'CmdlineEnter', -- config = tools.wilder_conf -- } use { 'karb94/neoscroll.nvim', event = 'WinScrolled', config = tools.neoscroll_conf } use { -- TODO: colors 'michaelb/sniprun', run = 'bash ./install.sh 1', cmd = 'SnipRun' } use { 'sbdchd/neoformat', cmd = 'Neoformat' } use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking -- TODO: nvim-lint, rest.nvim, parinfer.nvim, editorconfig.nvim, conjure, -- nvim-spectre, nvim-dap-ui, dial.nvim, asynctasks.nvim, hotpot.nvim end )