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() vim.cmd([[ augroup packer_user_config autocmd! autocmd BufWritePost plugins.lua source | PackerSync augroup end ]]) return require('packer').startup(function(use) use 'wbthomason/packer.nvim' use 'tpope/vim-sensible' use 'tpope/vim-surround' use 'tpope/vim-commentary' use 'tpope/vim-repeat' use 'tpope/vim-dispatch' use 'tpope/vim-abolish' use { 'tpope/vim-fugitive', 'tpope/vim-rhubarb', } use 'christoomey/vim-sort-motion' use 'christoomey/vim-tmux-navigator' use { 'kana/vim-textobj-user', 'kana/vim-textobj-indent', 'kana/vim-textobj-line', } use { 'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = { { 'nvim-lua/plenary.nvim' }, { 'nvim-telescope/telescope-fzf-native.nvim', run='make' } }, config = function() require('telescope').setup() require('telescope').load_extension('fzf') end } use { 'folke/which-key.nvim', config = function() require('keys') end } use 'preservim/nerdtree' use { { 'williamboman/mason.nvim', config = function() require('mason').setup() end }, 'williamboman/mason-lspconfig.nvim', 'neovim/nvim-lspconfig', 'mfussenegger/nvim-dap', 'jose-elias-alvarez/null-ls.nvim', 'mhartington/formatter.nvim', } -- language specific plugins use { 'jxnblk/vim-mdx-js', } use { 'dracula/vim', as = 'dracula' } -- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins if packer_bootstrap then require('packer').sync() end end)