Move package manager configuration to a new place

This commit is contained in:
Gergely Polonkai 2023-10-15 05:29:20 +02:00
parent 4c11f8190d
commit 2ab396a5fe
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4
1 changed files with 22 additions and 14 deletions

View File

@ -26,11 +26,13 @@ I prefer using freedesktops desktop specification everywhere.
(load "xdg-paths")
#+end_src
* Emacs configuration
* Set up the package manager
Im a ~package.el~ user. Dont package-shame me!
** Set up the package archives
#+BEGIN_SRC emacs-lisp
#+begin_src emacs-lisp
(require 'package)
(add-to-list 'package-archives
'("gnu" . "https://elpa.gnu.org/packages/"))
@ -41,42 +43,48 @@ I prefer using freedesktops desktop specification everywhere.
(add-to-list 'package-archives
'("org" . "https://orgmode.org/elpa/") t)
(package-initialize)
#+END_SRC
#+end_src
** Configure ~use-package~ and preload ~bind-key~
** Set up ~use-package~
#+BEGIN_SRC emacs-lisp
It is built-in since 29.1, and lets hope I never get back using older versions, but lets stay on the safe side for now.
#+begin_src emacs-lisp
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(customize-set-variable 'use-package-always-ensure t)
(customize-set-variable 'use-package-verbose nil)
(use-package use-package
:custom
(use-package-always-ensure t)
(use-package-verbose nil))
(use-package bind-key)
#+END_SRC
#+end_src
** Install and configure Quelpa
*** Install Quelpa so we can add packages not present in MELPA yet
#+BEGIN_SRC emacs-lisp
#+begin_src emacs-lisp
(unless (package-installed-p 'quelpa)
(with-temp-buffer
(url-insert-file-contents "https://raw.githubusercontent.com/quelpa/quelpa/master/quelpa.el")
(eval-buffer)
(quelpa-self-upgrade)))
#+END_SRC
#+end_src
*** And quelpa-use-package, too!
*** Finally, combine the powers of use-package and quelpa
#+BEGIN_SRC emacs-lisp
#+begin_src emacs-lisp
(quelpa
'(quelpa-use-package
:fetcher git
:url "https://github.com/quelpa/quelpa-use-package.git"))
(require 'quelpa-use-package)
#+END_SRC
#+end_src
* Emacs configuration
** Set up the really basic things