mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-29 14:33:34 -05:00
Add lang/text
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
;;; module-text.el
|
||||
;;; lang/text/config.el
|
||||
|
||||
(associate! text-mode :match "/LICENSE$")
|
||||
|
||||
(use-package markdown-mode
|
||||
(@def-package markdown-mode
|
||||
:mode ("\\.m\\(d\\|arkdown\\)$" "/README$"
|
||||
("/README\\.md$" . gfm-mode))
|
||||
:init
|
||||
(add-hook! markdown-mode
|
||||
(auto-fill-mode +1)
|
||||
(setq line-spacing 2
|
||||
fill-column 70))
|
||||
(setq markdown-enable-wiki-links t
|
||||
markdown-enable-math t
|
||||
markdown-italic-underscore t
|
||||
@@ -17,23 +11,27 @@
|
||||
markdown-gfm-additional-languages '("sh"))
|
||||
|
||||
:config
|
||||
(def-electric! markdown-mode :chars ("+" "#"))
|
||||
(@add-hook markdown-mode
|
||||
(auto-fill-mode +1)
|
||||
(setq line-spacing 2
|
||||
fill-column 70))
|
||||
|
||||
(sp-local-pair
|
||||
'(markdown-mode gfm-mode)
|
||||
"\`\`\`" "\`\`\`" :post-handlers '(("||\n" "RET")))
|
||||
|
||||
(map! :map gfm-mode-map "`" 'self-insert-command)
|
||||
(map! :map markdown-mode-map
|
||||
(@set :electric-chars "+" "#")
|
||||
(@map :map gfm-mode-map "`" 'self-insert-command)
|
||||
(@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
|
||||
"M-`" 'doom/markdown-insert-del
|
||||
"M-`" '+text/markdown-insert-del
|
||||
;; Assumes you have a markdown renderer plugin in chrome
|
||||
:nv "M-r" (λ! (doom-open-with "Google Chrome"))
|
||||
:nv "M-r" (@λ (doom-open-with "Google Chrome"))
|
||||
;; TODO: Make context sensitive
|
||||
:n "[p" 'markdown-promote
|
||||
:n "]p" 'markdown-demote
|
||||
@@ -44,11 +42,11 @@
|
||||
:nv "L" 'markdown-insert-reference-link-dwim
|
||||
:nv "b" 'markdown-preview)))
|
||||
|
||||
(use-package markdown-toc :after markdown-mode)
|
||||
|
||||
(use-package rst
|
||||
(@def-package markdown-toc
|
||||
:after markdown-mode)
|
||||
|
||||
|
||||
(@def-package rst ; built-in
|
||||
:mode ("\\.re?st$" . rst-mode)
|
||||
:config (def-builder! rst-mode rst-compile-pdf-preview))
|
||||
|
||||
(provide 'module-text)
|
||||
;;; module-text.el ends here
|
||||
:config (@set :builder '(rst-mode rst-compile-pdf-preview)))
|
||||
|
Reference in New Issue
Block a user