summary refs log tree commit diff
path: root/emacs.d/custom/fcuny-text.el
blob: 73f93a4cdd514721b50e4026abc136cd18647484 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(use-package flyspell
  :hook ((text-mode . flyspell-mode)
         (prog-mode . flyspell-prog-mode))
  :config
  (setq ispell-dictionary "en_US")

  (when (executable-find "aspell")
    (setq ispell-program-name "aspell"))

  (use-package flyspell-correct
    :after (flyspell)
    :commands (flyspell-correct-word-generic
               flyspell-correct-previous-word-generic)
    :bind (:map flyspell-mode-map
                ("C-;" . flyspell-correct-previous-word-generic))))

(use-package markdown-mode
  :ensure t
  :after (flyspell)
  :commands (markdown-mode gfm-mode)
  :mode (("README\\.md\\'" . gfm-mode)
         ("\\.md\\'"       . gfm-mode)
         ("\\.markdown\\'" . gfm-mode))
  :custom
  (markdown-fontify-code-blocks-natively t)
  :config
  (when (executable-find "pandoc")
    (setq markdown-command "pandoc -f markdown -t html")))

(provide 'fcuny-text)