General module refactor
This commit is contained in:
parent
0bd576673c
commit
7c9e96da87
14 changed files with 63 additions and 54 deletions
|
@ -3,9 +3,6 @@
|
|||
(def-package! markdown-mode
|
||||
:mode ("/README\\(?:\\.\\(?:markdown\\|md\\)\\)?\\'" . gfm-mode)
|
||||
:init
|
||||
(when (featurep! +pandoc)
|
||||
(setq markdown-command "pandoc --from=markdown --to=html --standalone --mathjax --highlight-style=pygments"))
|
||||
|
||||
(setq markdown-enable-wiki-links t
|
||||
markdown-italic-underscore t
|
||||
markdown-asymmetric-header t
|
||||
|
@ -17,7 +14,10 @@
|
|||
markdown-gfm-uppercase-checkbox t) ; for compat with org-mode
|
||||
|
||||
:config
|
||||
(set-flyspell-predicate! '(markdown-mode gfm-mode) #'+markdown-flyspell-word-p)
|
||||
(set-flyspell-predicate! '(markdown-mode gfm-mode)
|
||||
#'+markdown-flyspell-word-p)
|
||||
(set-lookup-handlers! '(markdown-mode gfm-mode)
|
||||
:file #'markdown-follow-thing-at-point)
|
||||
|
||||
(defun +markdown|set-fill-column-and-line-spacing ()
|
||||
(setq-local line-spacing 2)
|
||||
|
@ -25,8 +25,10 @@
|
|||
(add-hook 'markdown-mode-hook #'+markdown|set-fill-column-and-line-spacing)
|
||||
(add-hook 'markdown-mode-hook #'auto-fill-mode)
|
||||
|
||||
(sp-with-modes '(markdown-mode gfm-mode)
|
||||
(sp-local-pair "```" "```" :post-handlers '(:add ("||\n[i]" "RET"))))
|
||||
|
||||
(map! :map markdown-mode-map
|
||||
[remap find-file-at-point] #'markdown-follow-thing-at-point
|
||||
"M-*" #'markdown-insert-list-item
|
||||
"M-b" #'markdown-insert-bold
|
||||
"M-i" #'markdown-insert-italic
|
||||
|
@ -51,7 +53,9 @@
|
|||
"i" #'markdown-insert-image
|
||||
"l" #'markdown-insert-link))))
|
||||
|
||||
|
||||
(def-package! pandoc-mode
|
||||
:when (featurep! +pandoc)
|
||||
:commands pandoc-mode
|
||||
:hook (markdown-mode . conditionally-turn-on-pandoc))
|
||||
:hook (markdown-mode . conditionally-turn-on-pandoc)
|
||||
:init (setq markdown-command "pandoc --from=markdown --to=html --standalone --mathjax --highlight-style=pygments"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue