2022-08-08 01:41:01 +02:00
|
|
|
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
|
|
|
|
|
2022-08-08 13:57:38 +02:00
|
|
|
packer = require('packer')
|
|
|
|
packer.init()
|
2022-08-08 01:41:01 +02:00
|
|
|
|
2022-08-08 20:27:58 +02:00
|
|
|
packer.use 'https://github.com/wbthomason/packer.nvim'
|
2022-08-08 13:57:38 +02:00
|
|
|
|
2022-08-08 20:23:44 +02:00
|
|
|
-- common dependencies which require setup
|
2022-08-08 20:27:58 +02:00
|
|
|
packer.use {
|
2022-08-08 13:57:38 +02:00
|
|
|
'https://github.com/nvim-treesitter/nvim-treesitter',
|
|
|
|
run = function()
|
|
|
|
require('nvim-treesitter.install').update({ with_sync = true })
|
2022-08-08 01:41:01 +02:00
|
|
|
end
|
2022-08-08 13:57:38 +02:00
|
|
|
}
|
2022-08-09 00:19:29 +02:00
|
|
|
packer.use {
|
|
|
|
'https://github.com/vim-syntastic/syntastic',
|
|
|
|
config = function()
|
|
|
|
local sl = vim.o.statusline
|
|
|
|
sl = sl .. '%#warningmsg#'
|
|
|
|
sl = sl .. '%{SyntasticStatuslineFlag()}'
|
|
|
|
sl = sl .. '%*'
|
|
|
|
|
|
|
|
vim.g.syntastic_always_populate_loc_list = 1
|
|
|
|
vim.g.syntastic_auto_loc_list = 1
|
|
|
|
vim.g.syntastic_check_on_open = 1
|
|
|
|
vim.g.syntastic_check_on_wq = 0
|
|
|
|
end
|
|
|
|
}
|
2022-08-08 01:41:01 +02:00
|
|
|
|
2022-08-08 20:23:44 +02:00
|
|
|
-- compile and install new plugins when lua files in this dir are written
|
2022-08-08 01:41:01 +02:00
|
|
|
vim.cmd([[
|
|
|
|
augroup packer_user_config
|
|
|
|
autocmd!
|
|
|
|
autocmd User PackerComplete PackerCompile
|
2022-08-08 20:00:17 +02:00
|
|
|
autocmd BufWritePost nvim/lua/*.lua source <afile> | PackerInstall
|
2022-08-08 01:41:01 +02:00
|
|
|
augroup end
|
|
|
|
]])
|
|
|
|
|