dotfiles/.config/nvim/lua/plugins.lua

32 lines
932 B
Lua

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
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
end
packer = require('packer')
packer.init()
use = packer.use
use 'https://github.com/wbthomason/packer.nvim'
-- common dependencies
use {
'https://github.com/nvim-treesitter/nvim-treesitter',
run = function()
require('nvim-treesitter.install').update({ with_sync = true })
end
}
use 'https://github.com/L3MON4D3/LuaSnip'
-- compile and install new plugins when this is save in this dir are written
vim.cmd([[
augroup packer_user_config
autocmd!
autocmd User PackerComplete PackerCompile
autocmd BufWritePost nvim/lua/*.lua source <afile> | PackerInstall
augroup end
]])