2018-02-11 17:04:30 +08:00
|
|
|
;;; app/write/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
2018-02-13 17:50:58 -05:00
|
|
|
(defvar +write-text-scale nil
|
|
|
|
"What to scale the text up to in `+write-mode'. Uses `text-scale-set'.")
|
|
|
|
|
|
|
|
(defvar +write-line-spacing nil
|
|
|
|
"What to set `line-spacing' in `+write-mode'.")
|
|
|
|
|
2018-07-31 19:11:41 +02:00
|
|
|
(defun +write|init-line-numbers ()
|
|
|
|
(if +write-mode
|
|
|
|
(doom|enable-line-numbers)
|
|
|
|
(doom|disable-line-numbers)))
|
|
|
|
|
|
|
|
(defun +write|init-mixed-pitch ()
|
|
|
|
(mixed-pitch-mode (if +write-mode +1 -1)))
|
|
|
|
|
|
|
|
(defun +write|init-visual-fill-column ()
|
|
|
|
(visual-fill-column-mode (if +write-mode +1 -1)))
|
|
|
|
|
2018-02-13 17:50:58 -05:00
|
|
|
(add-hook! '+write-mode-hook
|
|
|
|
#'(flyspell-mode
|
|
|
|
visual-line-mode
|
2018-07-31 19:11:41 +02:00
|
|
|
+write|init-mixed-pitch
|
|
|
|
+write|init-visual-fill-column
|
|
|
|
+write|init-line-numbers
|
2018-02-13 17:50:58 -05:00
|
|
|
+write|init-org-mode))
|
|
|
|
|
|
|
|
|
|
|
|
;;
|
|
|
|
;; Plugins
|
|
|
|
;;
|
|
|
|
|
2018-04-28 16:12:22 -04:00
|
|
|
(def-package! langtool
|
|
|
|
:when (featurep! +langtool)
|
|
|
|
:commands (langtool-check
|
|
|
|
langtool-check-done
|
|
|
|
langtool-show-message-at-point
|
|
|
|
langtool-correct-buffer)
|
2018-07-31 18:41:34 +02:00
|
|
|
:init (setq langtool-default-language "en-US")
|
2018-04-28 16:12:22 -04:00
|
|
|
:config
|
2018-06-26 18:07:05 +02:00
|
|
|
(defvar langtool-language-tool-jar
|
|
|
|
(cond (IS-MAC
|
|
|
|
(locate-file "libexec/languagetool-commandline.jar"
|
|
|
|
(doom-files-in "/usr/local/Cellar/languagetool"
|
|
|
|
:type 'dirs
|
|
|
|
:depth 1)))
|
|
|
|
(IS-LINUX
|
|
|
|
"/usr/share/java/languagetool/languagetool-commandline.jar"))))
|
2018-02-13 17:50:58 -05:00
|
|
|
|
|
|
|
|
2018-07-31 18:41:34 +02:00
|
|
|
;; `synosaurus'
|
|
|
|
(setq synosaurus-choose-method 'default)
|
2018-02-13 17:50:58 -05:00
|
|
|
|
|
|
|
|
2018-07-31 18:41:34 +02:00
|
|
|
;; `mixed-pitch'
|
|
|
|
(after! mixed-pitch
|
2018-02-11 17:04:30 +08:00
|
|
|
(setq mixed-pitch-fixed-pitch-faces
|
2018-02-13 17:50:58 -05:00
|
|
|
(append mixed-pitch-fixed-pitch-faces
|
|
|
|
'(org-todo-keyword-todo
|
|
|
|
org-todo-keyword-habt
|
|
|
|
org-todo-keyword-done
|
|
|
|
org-todo-keyword-wait
|
|
|
|
org-todo-keyword-kill
|
|
|
|
org-todo-keyword-outd
|
2018-07-31 19:11:10 +02:00
|
|
|
org-todo
|
|
|
|
line-number
|
|
|
|
line-number-current-line
|
2018-02-13 17:50:58 -05:00
|
|
|
org-special-keyword
|
|
|
|
org-date
|
|
|
|
org-property-value
|
|
|
|
org-special-keyword
|
|
|
|
org-property-value
|
|
|
|
org-ref-cite-face
|
|
|
|
org-tag
|
|
|
|
font-lock-comment-face))))
|