summary refs log tree commit diff
path: root/configs/rcs/emacs.d/config/fcuny-text.el
diff options
context:
space:
mode:
Diffstat (limited to 'configs/rcs/emacs.d/config/fcuny-text.el')
-rw-r--r--configs/rcs/emacs.d/config/fcuny-text.el30
1 files changed, 30 insertions, 0 deletions
diff --git a/configs/rcs/emacs.d/config/fcuny-text.el b/configs/rcs/emacs.d/config/fcuny-text.el
new file mode 100644
index 0000000..3bcd17c
--- /dev/null
+++ b/configs/rcs/emacs.d/config/fcuny-text.el
@@ -0,0 +1,30 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package ispell
+  :ensure t
+  :config
+  (when (executable-find "aspell")
+    (setq ispell-program-name "aspell"
+          ispell-list-command "--list")))
+
+(use-package flyspell-correct
+  :ensure t)
+
+(use-package flyspell
+  :ensure t
+  :hook ((text-mode-hook . flyspell-mode)
+         (prog-mode-hook . flyspell-prog-mode)))
+
+(use-package markdown-mode
+  :ensure t
+  :after (flyspell)
+  :mode (("\\.md\\'" . gfm-mode)
+         ("\\.markdown\\'" . gfm-mode))
+  :hook (markdown-mode . flyspell-mode)
+  :init (setq markdown-command "pandoc -f markdown_github -c https://goo.gl/OVmlwT --self-contained"
+              markdown-header-scaling 't)
+  :config
+  (add-hook 'gfm-mode-hook 'visual-line-mode))
+
+(provide 'fcuny-text)