Sunday, November 19, 2023

Using use-package to bootstrap quelpa and quelpa-use-package

I use use-package and wanted to use it to bootstrap quelpa and loading quelpa-use-package. The project pages had instructions without use-package. Here is what I had to do.

(require 'package)
(setq package-archives
      '(("melpa" . "https://melpa.org/packages/"))
      use-package-always-ensure t)

(package-initialize)

(require 'use-package-ensure)

(use-package quelpa
  :ensure)

(use-package quelpa-use-package
  :demand
  :config
  (quelpa-use-package-activate-advice))

;; Now, you can take advantage of the :quelpa keyword.
(use-package copilot
  :quelpa (copilot :fetcher github
                   :repo "zerolfx/copilot.el"
                   :branch "main"
                   :files ("dist" "*.el"))
  :hook (prog-mode . copilot-mode)
  :bind (:map copilot-completion-map
              ("<tab>" . copilot-accept-completion)))

No comments: