diff --git a/lua/core/init.lua b/lua/core/init.lua index 3067cc2..12bbce6 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -42,6 +42,13 @@ autocmd("FileType", { -- wrap the PackerSync command to warn people before using it in NvChadSnapshots autocmd("VimEnter", { callback = function() - vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('plugins') require('core.utils').packer_sync()" + vim.api.nvim_create_user_command("PackerSync", function(opts) + require "plugins" + require("core.utils").packer_sync(opts.fargs) + end, { + bang = true, + nargs = "*", + complete = require("packer").plugin_complete, + }) end, })