local M = {} function M.setup() local ensure_packer = function() 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 fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }) vim.cmd [[packadd packer.nvim]] return true end return false end local packer_bootstrap = ensure_packer() local startup = function(use) use 'wbthomason/packer.nvim' use { 'lewis6991/impatient.nvim', config = function() require('impatient') end, } use { 'hrsh7th/vim-vsnip', config = function() vim.api.nvim_exec([[ imap vsnip#jumpable(1) ? '(vsnip-jump-next)' : '' smap vsnip#jumpable(1) ? '(vsnip-jump-next)' : '' imap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' smap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' ]], false) end } use { 'rafamadriz/friendly-snippets' } use 'hrsh7th/cmp-nvim-lsp-signature-help' use 'ray-x/lsp_signature.nvim' use { 'RishabhRD/nvim-lsputils', requires = { 'RishabhRD/popfix' } } -- use { 'stevearc/dressing.nvim', config = function() -- require('dressing').setup({ -- input = { -- relative = 'editor', -- }, -- }) -- end } use { 'chrisbra/Colorizer', cmd = 'ColorToggle', keys = { 'n', 'c ColorToggle' } } use { 'lewis6991/gitsigns.nvim', requires = { 'nvim-lua/plenary.nvim' }, config = function() require 'gitsigns'.setup({}) end } use { 'AndrewRadev/linediff.vim', cmd = 'LineDiffAdd' } use 'lukas-reineke/indent-blankline.nvim' use { 'b3nj5m1n/kommentary', config = function() local kommentary = require('kommentary.config') kommentary.configure_language('php', { prefer_single_line_comments = true, }) kommentary.configure_language('lua', { prefer_single_line_comments = true, }) end } use 'editorconfig/editorconfig-vim' use { 'vlada-dudr/vdebug', opt = true, } use { 'phaazon/mind.nvim', config = function () require('mind').setup({}) end } use { 'dyng/ctrlsf.vim', cmd = 'CtrlSF' } use { 'folke/neodev.nvim' } use { 'AndrewRadev/tagalong.vim' } use { 'andymass/vim-matchup' } use { 'fpob/nette.vim', ft = 'nette' } use { 'kchmck/vim-coffee-script' } use { 'folke/trouble.nvim', requires = 'kyazdani42/nvim-web-devicons', cmd = 'TroubleToggle', keys = { 'n', 't TroubleToggle' }, config = function() require('configs.trouble').setup() end } use { 'ziglang/zig.vim', ft = 'zig' } if packer_bootstrap then require('packer').sync() end end require('packer').startup({ startup, config = { max_jobs = 5, transitive_disable = false, display = { open_fn = function() return require('packer.util').float { border = 'single' } end, }, } }) end return M