doomemacs/modules/module-text.el

43 lines
1.3 KiB
EmacsLisp
Raw Normal View History

;;; module-text.el
2015-06-15 09:06:10 +02:00
(use-package markdown-mode
2016-05-20 09:24:05 -04:00
:mode ("\\.m\\(d\\|arkdown\\)$" "/README$"
("/README\\.md$" . gfm-mode))
:init
(add-hook 'markdown-mode-hook 'turn-on-auto-fill)
(setq markdown-enable-wiki-links t
markdown-italic-underscore t
markdown-enable-math t
markdown-make-gfm-checkboxes-buttons t
markdown-gfm-additional-languages '("sh"))
2016-05-21 23:12:50 -04:00
2015-06-15 09:06:10 +02:00
:config
2016-04-19 03:13:48 -04:00
(map! :map markdown-mode-map
"<backspace>" nil
"<M-left>" nil
"<M-right>" nil
"M-*" 'markdown-insert-list-item
"M-b" 'markdown-insert-bold
"M-i" 'markdown-insert-italic
2016-05-20 22:37:30 -04:00
"M-`" 'doom/markdown-insert-del
2016-05-21 23:12:50 -04:00
;; Assumes you have a markdown renderer plugin in chrome
:nv "M-r" (λ! (doom-open-with "Google Chrome"))
;; TODO: Make context sensitive
:n "[p" 'markdown-promote
:n "]p" 'markdown-demote
:i "M--" 'markdown-insert-hr
2016-04-19 03:13:48 -04:00
(:localleader
:nv "i" 'markdown-insert-image
:nv "l" 'markdown-insert-link
:nv "L" 'markdown-insert-reference-link-dwim
2016-05-21 23:12:50 -04:00
:nv "b" 'markdown-preview)))
(use-package markdown-toc :after markdown-mode)
2016-05-26 18:57:49 -04:00
(use-package rst
:mode ("\\.re?st$" . rst-mode)
:config (def-builder! rst-mode rst-compile-pdf-preview))
(provide 'module-text)
;;; module-text.el ends here