-- This file can be loaded by calling `lua require('plugins')` from your init.vim -- Only required if you have packer configured as `opt` 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 packer = require('packer') packer.startup(function(use) -- Packer can manage itself use 'wbthomason/packer.nvim' use { 'marko-cerovac/material.nvim', config = function() vim.g.material_style = "palenight" vim.cmd [[colorscheme material]] end } use { 'TimUntersberger/neogit', requires = 'nvim-lua/plenary.nvim' } end) if packer_bootstrap then require('packer').sync() end local autocmd = vim.api.nvim_create_autocmd local augroup = vim.api.nvim_create_augroup autocmd('BufWritePost', { group = augroup('packer_user_config', { clear = true }), pattern = "init.lua", once = true, callback = function() vim.cmd('source $MYVIMRC') packer.compile() end }) local neogit = require('neogit') neogit.setup {}