summary refs log tree commit diff
path: root/emacs/custom/fcuny-text.el
blob: 56f1b80e1b36e2ea98bdad396b6f58fff596688d (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
31
32
33
34
35
36
37
38
39
;;; fcuny-text.el --- configures
;;; Commentary:
;;; Code:

(require 'use-package)

(use-package flyspell
  :ensure t
  :if (executable-find "aspell")
  :hook ((text-mode . flyspell-mode)
         (prog-mode . flyspell-prog-mode))
  :custom
  (ispell-dictionary "en_US")
  (ispell-program-name "aspell")
  (ispell-extra-args '("--camel-case"))
  :config
  (use-package flyspell-correct-ivy
    :after flyspell
    :ensure t
    :bind (:map flyspell-mode-map
                ("C-M-:" . flyspell-correct-at-point))
    :custom
    (flyspell-correct-interface #'flyspell-correct-ivy)))

(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)
;;; fcuny-text.el ends here