Removed unnecessary use of `vim.cmd` in plugins.lua

pull/116/head
aflyingpumpkin 3 years ago
parent 4e038120bf
commit b5daec0ddc

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

Loading…
Cancel
Save