(fn setup [module args]
  `((. (require ,module) :setup) ,args))

(fn packer [config ...]
  "syntactic sugar over packer's startup function."
  (local packer `(require :packer))
  `((. ,packer :startup)
    {1 (lambda [(unquote (sym :use))]
         (use :wbthomason/packer.nvim)
         (do ,...)
         (if (= true _G.packer_bootstrap)
             ((. ,packer :sync))))
     :config ,config}))

{: setup : packer}
