Replace vim.cmd autogroup with the lua equivalent.

pull/175/head
Palle Ravn 3 years ago
parent 4e038120bf
commit 57b8ed2c49

@ -16,12 +16,8 @@ if fn.empty(fn.glob(install_path)) > 0 then
end
-- Autocommand that reloads neovim whenever you save the plugins.lua file
vim.cmd [[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerSync
augroup end
]]
local group = vim.api.nvim_create_augroup("packer_user_config", { clear = true })
vim.api.nvim_create_autocmd("BufWritePost", { pattern = "plugins.lua", command = "source <afile> | PackerSync", group = group})
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer")

Loading…
Cancel
Save