Move package manager configuration to a new place
This commit is contained in:
parent
4c11f8190d
commit
2ab396a5fe
@ -26,11 +26,13 @@ I prefer using freedesktop’s desktop specification everywhere.
|
|||||||
(load "xdg-paths")
|
(load "xdg-paths")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Emacs configuration
|
* Set up the package manager
|
||||||
|
|
||||||
|
I’m a ~package.el~ user. Don’t package-shame me!
|
||||||
|
|
||||||
** Set up the package archives
|
** Set up the package archives
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(require 'package)
|
(require 'package)
|
||||||
(add-to-list 'package-archives
|
(add-to-list 'package-archives
|
||||||
'("gnu" . "https://elpa.gnu.org/packages/"))
|
'("gnu" . "https://elpa.gnu.org/packages/"))
|
||||||
@ -41,42 +43,48 @@ I prefer using freedesktop’s desktop specification everywhere.
|
|||||||
(add-to-list 'package-archives
|
(add-to-list 'package-archives
|
||||||
'("org" . "https://orgmode.org/elpa/") t)
|
'("org" . "https://orgmode.org/elpa/") t)
|
||||||
(package-initialize)
|
(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 let’s hope I never get back using older versions, but let’s stay on the safe side for now.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
(unless (package-installed-p 'use-package)
|
(unless (package-installed-p 'use-package)
|
||||||
(package-refresh-contents)
|
(package-refresh-contents)
|
||||||
(package-install 'use-package))
|
(package-install 'use-package))
|
||||||
|
|
||||||
(require 'use-package)
|
(require 'use-package)
|
||||||
|
|
||||||
(customize-set-variable 'use-package-always-ensure t)
|
(use-package use-package
|
||||||
(customize-set-variable 'use-package-verbose nil)
|
:custom
|
||||||
|
(use-package-always-ensure t)
|
||||||
|
(use-package-verbose nil))
|
||||||
|
|
||||||
(use-package bind-key)
|
(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)
|
(unless (package-installed-p 'quelpa)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(url-insert-file-contents "https://raw.githubusercontent.com/quelpa/quelpa/master/quelpa.el")
|
(url-insert-file-contents "https://raw.githubusercontent.com/quelpa/quelpa/master/quelpa.el")
|
||||||
(eval-buffer)
|
(eval-buffer)
|
||||||
(quelpa-self-upgrade)))
|
(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
|
||||||
'(quelpa-use-package
|
'(quelpa-use-package
|
||||||
:fetcher git
|
:fetcher git
|
||||||
:url "https://github.com/quelpa/quelpa-use-package.git"))
|
:url "https://github.com/quelpa/quelpa-use-package.git"))
|
||||||
(require 'quelpa-use-package)
|
(require 'quelpa-use-package)
|
||||||
#+END_SRC
|
#+end_src
|
||||||
|
|
||||||
|
* Emacs configuration
|
||||||
|
|
||||||
** Set up the really basic things
|
** Set up the really basic things
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user