2023-07-30 04:26:25 +02:00
|
|
|
-- Auto install packer.nvim if not exists
|
2024-03-20 12:49:43 +01:00
|
|
|
local install_path = vim.fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim'
|
2023-07-30 04:26:25 +02:00
|
|
|
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
2024-03-20 12:49:43 +01:00
|
|
|
vim.api.nvim_command('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path)
|
2023-07-30 04:26:25 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
vim.cmd [[packadd packer.nvim]]
|
|
|
|
-- Auto compile when there are changes in plugins.lua
|
|
|
|
vim.cmd 'autocmd BufWritePost plugins.lua PackerCompile'
|