Update use-package definition

* Instead of overriding `:init` handler, use `:hook` instead.
* Add `:requires` (can also be `:after` if you prefer that)
  * Adding `all-the-icons` to the handler causes the package to not load, not sure why.
* Add example with use-package to install dependencies
This commit is contained in:
Justin Smestad 2018-06-15 09:18:51 -06:00 committed by GitHub
parent 7498b4879e
commit 872287147b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,12 +33,23 @@ In `init.el`,
(use-package doom-modeline
:ensure t
:defer t
:init (add-hook 'after-init-hook #'doom-modeline-init))
:requires (shrink-path eldoc-eval)
:hook (after-init . doom-modeline-init))
```
This package requires the fonts included with `all-the-icons` to be installed.
Run `M-x all-the-icons-install-fonts` to do so.
If you do not have them already installed, here are the dependencies:
``` emacs-lisp
(use-package shrink-path)
(use-package all-the-icons)
(use-package eldoc-eval)
```
## Screenshots
![modeline](https://github.com/hlissner/doom-emacs/raw/screenshots/ml.png)