docs/faq: clarify where to put snippets

This commit is contained in:
Henrik Lissner 2019-11-24 23:29:34 -05:00
parent 5623b8b9ba
commit 2a01de5f6c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -540,7 +540,7 @@ section of the [[file:getting_started.org][Getting Started]] guide.
With the ~package!~ macro's ~:disable~ property: With the ~package!~ macro's ~:disable~ property:
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
;;; in DOOMDIR/packages.el ;;; add to DOOMDIR/packages.el
(package! irony :disable t) (package! irony :disable t)
#+END_SRC #+END_SRC
@ -589,7 +589,7 @@ available. You can either set ~doom-theme~ or manually load a theme with the
~load-theme~ function. ~load-theme~ function.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;;; in ~/.doom.d/config.el ;;; add to ~/.doom.d/config.el
(setq doom-theme 'doom-tomorrow-night) (setq doom-theme 'doom-tomorrow-night)
;; or ;; or
(load-theme 'doom-tomorrow-night t) (load-theme 'doom-tomorrow-night t)
@ -609,10 +609,10 @@ To install a theme from a third party plugin, say, [[https://github.com/bbatsov/
install it, then load it: install it, then load it:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; in ~/.doom.d/packages.el ;;; add to ~/.doom.d/packages.el
(package! solarized) (package! solarized)
;; in ~/.doom.d/config.el ;;; add to ~/.doom.d/config.el
(setq doom-theme 'solarized-dark) (setq doom-theme 'solarized-dark)
#+END_SRC #+END_SRC
@ -633,7 +633,7 @@ or [[https://wiki.archlinux.org/index.php/X_Logical_Font_Description][xlfd font
e.g. e.g.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; ~/.doom.d/config.el ;;; Add to ~/.doom.d/config.el
(setq doom-font (font-spec :family "Input Mono Narrow" :size 12 :weight 'semi-light) (setq doom-font (font-spec :family "Input Mono Narrow" :size 12 :weight 'semi-light)
doom-variable-pitch-font (font-spec :family "Fira Sans") ; inherits `doom-font''s :size doom-variable-pitch-font (font-spec :family "Fira Sans") ; inherits `doom-font''s :size
doom-unicode-font (font-spec :family "Input Mono Narrow" :size 12) doom-unicode-font (font-spec :family "Input Mono Narrow" :size 12)
@ -701,7 +701,7 @@ These variables control what key to use for leader and localleader keys:
e.g. e.g.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; in ~/.doom.d/config.el ;;; add to ~/.doom.d/config.el
(setq doom-leader-key "," (setq doom-leader-key ","
doom-localleader-key "\\") doom-localleader-key "\\")
#+END_SRC #+END_SRC
@ -711,6 +711,7 @@ Doom uses the ~display-line-numbers~ package, which is built into Emacs 26+.
*** Disabling line numbers entirely *** Disabling line numbers entirely
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
;;; add to ~/.doom.d/config.el
(setq display-line-numbers-type nil) (setq display-line-numbers-type nil)
;; or ;; or
(remove-hook! '(prog-mode-hook text-mode-hook conf-mode-hook) (remove-hook! '(prog-mode-hook text-mode-hook conf-mode-hook)
@ -731,6 +732,7 @@ nil no line numbers
For example: For example:
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
;;; add to ~/.doom.d/config.el
(setq display-line-numbers-type 'relative) (setq display-line-numbers-type 'relative)
#+END_SRC #+END_SRC
@ -903,10 +905,10 @@ putting in the time to learn them.
Otherwise, it is trivial to install expand-region and binds keys to it yourself: Otherwise, it is trivial to install expand-region and binds keys to it yourself:
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
;; in ~/.doom.d/packages.el ;;; add to ~/.doom.d/packages.el
(package! expand-region) (package! expand-region)
;; in ~/.doom.d/config.el ;;; add to ~/.doom.d/config.el
(map! :nv "C-=" #'er/contract-region (map! :nv "C-=" #'er/contract-region
:nv "C-+" #'er/expand-region) :nv "C-+" #'er/expand-region)
#+END_SRC #+END_SRC
@ -932,10 +934,10 @@ That said, if you still want ~exec-path-from-shell~, it is trivial to install
yourself: yourself:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; in ~/.doom.d/packages.el ;;; add to ~/.doom.d/packages.el
(package! exec-path-from-shell) (package! exec-path-from-shell)
;; in ~/.doom.d/config.el ;;; add to ~/.doom.d/config.el
(require 'exec-path-from-shell) (require 'exec-path-from-shell)
(when (display-graphic-p) (when (display-graphic-p)
(exec-path-from-shell-initialize)) (exec-path-from-shell-initialize))