Skip to content

Commit

Permalink
docs(*): replace all-the-icons with nerd-icons
Browse files Browse the repository at this point in the history
Also colorizes the leading icon in notices.
  • Loading branch information
hlissner committed Sep 16, 2023
1 parent ae8c5cf commit 88bb045
Show file tree
Hide file tree
Showing 158 changed files with 542 additions and 516 deletions.
2 changes: 1 addition & 1 deletion docs/appendix.org
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
behaviour for known commands.

#+begin_quote
📌 Doom users with evil enabled will find the universal argument on [[kbd:][SPC u]]
󰐃 Doom users with evil enabled will find the universal argument on [[kbd:][SPC u]]
instead than [[kbd:][C-u]].
#+end_quote

Expand Down
6 changes: 6 additions & 0 deletions docs/examples.org
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
#+subtitle: Samples of Emacs/Doom dotfiles, concepts, and sub-projects
#+property: header-args:elisp :results pp

#+begin_quote
󰐃 Our documentation was designed to be read in Doom Emacs ([[kbd:][M-x doom/help]]) or
online at https://docs.doomemacs.org. Avoid reading it elsewhere (like
Github), where it will be rendered incorrectly.
#+end_quote

* Introduction
Examples speak louder than technical explanations, so this file exists to house
examples of Doom's (and Emacs') concepts, libraries, dotfiles, and more, for
Expand Down
18 changes: 12 additions & 6 deletions docs/faq.org
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
#+subtitle: Answers to common issues and questions
#+startup: nonum show2levels*

#+begin_quote
󰐃 Our documentation was designed to be read in Doom Emacs ([[kbd:][M-x doom/help]]) or
online at https://docs.doomemacs.org. Avoid reading it elsewhere (like
Github) where it will be rendered incorrectly.
#+end_quote

* General
:PROPERTIES:
:ID: 3c17177d-8ba9-4d1a-a279-b6dea21c8a9a
Expand Down Expand Up @@ -266,7 +272,7 @@ For example:
#+end_src

#+begin_quote
🚧 If you or Emacs can't find your font, use ~M-x describe-font~ to look them
󰐃 If you or Emacs can't find your font, use ~M-x describe-font~ to look them
up, or run ~$ fc-list~ to see all the available fonts on your system. *Font
issues are /rarely/ Doom issues!*
#+end_quote
Expand Down Expand Up @@ -618,7 +624,7 @@ keybinds to work:
#+end_src

#+begin_quote
📌 I use [C-left] because it is easier to type than "<C-left>", but they are
󰐃 I use [C-left] because it is easier to type than "<C-left>", but they are
equivalent; two different ways to refer to the same key.
#+end_quote
** Recursive load error on startup
Expand All @@ -638,7 +644,7 @@ Then these are the three most common explanations:
- *GNU* =tar= and/or =gzip= are not installed on your system.

#+begin_quote
🚧 *Warning macOS and *BSD distro users:* you likely have BSD variants of
*Warning macOS and *BSD distro users:* you likely have BSD variants of
=tar= and =gzip= installed by default. Emacs requires the GNU variants!
#+end_quote

Expand Down Expand Up @@ -833,13 +839,13 @@ There's more about quoting [[https://emacsdocs.org/docs/elisp/Quoting][in the Em

** TODO How does Doom Emacs start up so quickly?
#+begin_quote
🔨 *This post is a work in progress!* However, there's a post on our Discourse
󱌣 *This post is a work in progress!* However, there's a post on our Discourse
that outlines [[https://discourse.doomemacs.org/t/how-does-doom-start-up-so-quickly/163/1][some of our older techniques]].
#+end_quote

** TODO How does Doom Emacs improve runtime performance?
#+begin_quote
🔨 *This post is a work in progress!*
󱌣 *This post is a work in progress!*
#+end_quote

** Why does Doom not use dash, f, s, or similar libraries?
Expand Down Expand Up @@ -911,7 +917,7 @@ you, a combination of [[kbd:][o]] (swaps your cursor between the two ends of the
and motion keys can adjust the ends of your selection.

#+begin_quote
📌 There are also text objects for xml tags ([[kbd:][x]]), C-style function arguments
󰐃 There are also text objects for xml tags ([[kbd:][x]]), C-style function arguments
([[kbd:][a]]), angle brackets, and single/double quotes.
#+end_quote

Expand Down
36 changes: 25 additions & 11 deletions lisp/lib/docs.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,45 @@
(defvar doom-docs-header-specs
'(("/docs/index\\.org$"
(:label "FAQ"
:icon "question_answer"
:icon "nf-md-message_question_outline"
:link "doom-faq:"
:help-echo "Open the FAQ document"))
(("/docs/[^/]+\\.org$" "/modules/README\\.org$")
(:label "Back to index"
:icon "arrow_back"
:icon "nf-md-arrow_left"
:link "doom-index"
:help-echo "Navigate to the root index"))
("/modules/[^/]+/README\\.org$"
(:label "Back to module index"
:icon "arrow_back"
:icon "nf-md-arrow_left"
:link "doom-module-index:"))
("/modules/[^/]+/[^/]+/README\\.org$"
(:label "Back to module index"
:icon "arrow_back"
:icon "nf-md-arrow_left"
:link "doom-module-index:")
(:label "History"
:icon "history"
:icon "nf-md-history"
:icon-face font-lock-variable-name-face
:link (lambda ()
(cl-destructuring-bind (category . module) (doom-module-from-path (buffer-file-name))
(format "doom-module-history:%s/%s" (doom-keyword-name category) module)))
:help-echo "View the module history"
:align right)
(:label "Issues"
:icon "error_outline"
:icon "nf-md-flag"
:icon-face error
:link (lambda ()
(cl-destructuring-bind (category . module) (doom-module-from-path (buffer-file-name))
(format "doom-module-issues::%s %s" category module)))
:align right))
(t
(:label "Suggest edits"
:icon "edit"
:icon "nf-md-account_edit"
:icon-face warning
:link "doom-suggest-edit"
:align right)
(:label "Help"
:icon "help_outline"
:icon "nf-md-timeline_help_outline"
:icon-face font-lock-function-name-face
:link (lambda ()
(let ((title (cadar (org-collect-keywords '("TITLE")))))
Expand Down Expand Up @@ -101,9 +101,10 @@
(defun doom-docs--make-header-link (spec)
"Create a header link according to SPEC."
(let ((icon (and (plist-get spec :icon)
(funcall (or (plist-get spec :icon-function)
#'nerd-icons-mdicon)
(plist-get spec :icon))))
(with-demoted-errors "DOCS ERROR: %s"
(funcall (or (plist-get spec :icon-function)
#'nerd-icons-mdicon)
(plist-get spec :icon)))))
(label (pcase (plist-get spec :label)
((and (pred functionp) lab)
(funcall lab))
Expand Down Expand Up @@ -472,13 +473,26 @@ This primes `org-mode' for reading."
(org-id-add-location id fname)
id))))

(defconst doom-docs-org-font-lock-keywords
'(("^\\( *\\)#\\+begin_quote\n\\1 \\([󰝗󱌣󰐃󰔓󰟶󰥔]\\) "
2 (pcase (match-string 2)
("󰝗" 'font-lock-comment-face)
("󱌣" 'font-lock-comment-face)
("󰐃" 'error)
("󰔓" 'success)
("󰟶" 'font-lock-keyword-face)
("󰥔" 'font-lock-constant-face)
("" 'warning))))
"Extra font-lock keywords for Doom documentation.")

;;;###autoload
(define-derived-mode doom-docs-org-mode org-mode "Doom Docs"
"A derivative of `org-mode' for Doom's documentation files.
Keeps track of its own IDs in `doom-docs-dir' and toggles `doom-docs-mode' when
`read-only-mode' is activated."
:after-hook (visual-line-mode -1)
(font-lock-add-keywords nil doom-docs-org-font-lock-keywords)
(let ((gc-cons-threshold most-positive-fixnum)
(gc-cons-percentage 1.0))
(require 'org-id)
Expand Down
6 changes: 3 additions & 3 deletions modules/app/calendar/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ This module requires:

* TODO Usage
#+begin_quote
🔨 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]
󱌣 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]
#+end_quote

* TODO Configuration
#+begin_quote
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

** Changing calendar sources
Expand Down Expand Up @@ -74,5 +74,5 @@ to link your calendar with Google calendars.

* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote
6 changes: 3 additions & 3 deletions modules/app/emms/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ These should be available through your OS package manager.

* TODO Usage
#+begin_quote
🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

** Keybinds
Expand All @@ -56,7 +56,7 @@ These should be available through your OS package manager.

* TODO Configuration
#+begin_quote
🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
󱌣 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
#+end_quote

* Troubleshooting
Expand All @@ -70,5 +70,5 @@ Try [[kbd:][M-x +emms/mpd-restart-music-daemon]] then restart emacs.

* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote
2 changes: 1 addition & 1 deletion modules/app/everywhere/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ Most other behavior is implemented as hooks on ~emacs-everywhere-init-hooks~.

* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote
8 changes: 4 additions & 4 deletions modules/app/irc/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ environment.systemPackages = [ pkgs.gnutls ];

* TODO Usage
#+begin_quote
🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

To connect to IRC use ~M-x =irc~.
Expand All @@ -70,7 +70,7 @@ When in a circe buffer these keybindings will be available:

* TODO Configuration
#+begin_quote
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

Use ~set-irc-server! SERVER PLIST~ to configure IRC servers. Its second argument
Expand All @@ -92,7 +92,7 @@ here are ways to avoid that:

** TODO Pass: the unix password manager
#+begin_quote
🔨 /This section is outdated and needs to be rewritten./ [[doom-contrib-module:][Rewrite it?]]
󱌣 /This section is outdated and needs to be rewritten./ [[doom-contrib-module:][Rewrite it?]]
#+end_quote

[[https://www.passwordstore.org/][Pass]] is my tool of choice. I use it to manage my passwords. If you activate the
Expand Down Expand Up @@ -169,5 +169,5 @@ username: myusername

* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote
6 changes: 3 additions & 3 deletions modules/app/rss/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ Read RSS feeds in the comfort of Emacs.

* TODO Usage
#+begin_quote
🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

- As there isn't currently binding for ~elfeed-update~ you can run it with ~M-x
elfeed-update~

* TODO Configuration
#+begin_quote
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

** Without +org
Expand Down Expand Up @@ -128,5 +128,5 @@ Hook ~elfeed-update~ to ~elfeed-search-mode-hook~:

* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote
6 changes: 3 additions & 3 deletions modules/app/twitter/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ This module requires:

* TODO Usage
#+begin_quote
🔨 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]
󱌣 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]
#+end_quote

* TODO Configuration
#+begin_quote
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

** Commands & Keybindings
Expand Down Expand Up @@ -96,6 +96,6 @@ key for evil users. To work around this issue you may use [[kbd:][M-SPC]] instea

* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote

8 changes: 4 additions & 4 deletions modules/checkers/grammar/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ will need to set ~langtool-language-tool-jar~ to its location.

* TODO Usage
#+begin_quote
🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

** Language Tool
[[https://www.languagetool.org/][Language Tool]] is a polyglot proofreader service that checks for grammar and
stylistic issues in your writing. This requires Java 1.8+.

#+begin_quote
🚧 This requires Java 1.8+
This requires Java 1.8+
#+end_quote

*** Commands
Expand All @@ -61,7 +61,7 @@ This minor mode highlights weasel words, duplication and passive voice.

* TODO Configuration
#+begin_quote
🔨 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
󱌣 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
#+end_quote

* Troubleshooting
Expand All @@ -72,5 +72,5 @@ This minor mode highlights weasel words, duplication and passive voice.

* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote
8 changes: 4 additions & 4 deletions modules/checkers/spell/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ your system and in your =$PATH=. They also need dictionaries for your
language(s).

#+begin_quote
🚧 If you *are not* using [[doom-module:+flyspell]], you will need =aspell= (and a dictionary)
If you *are not* using [[doom-module:+flyspell]], you will need =aspell= (and a dictionary)
installed whether or not you have [[doom-module:+hunspell]] or [[doom-module:+enchant]] enabled. This is
because [[doom-package:spell-fu]] does not support generating the word list with anything
other than =aspell= yet.
Expand Down Expand Up @@ -108,7 +108,7 @@ language(s).

* TODO Usage
#+begin_quote
🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

When using [[doom-module:+everywhere]], spell checking is performed for as many major modes as
Expand All @@ -117,7 +117,7 @@ major modes.

* TODO Configuration
#+begin_quote
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
󱌣 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote

Dictionary is set by ~ispell-dictionary~ variable. Can be changed locally with
Expand Down Expand Up @@ -231,5 +231,5 @@ After the file is created, restart emacs and adding words should work.

* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote
Loading

0 comments on commit 88bb045

Please sign in to comment.