Files
doomemacs/modules/lang/markdown
Henrik Lissner 1bb191e8eb bump: :lang
FStarLang/fstar-mode.el@6e5d3ea858 -> FStarLang/fstar-mode.el@36ffb46259
ProofGeneral/PG@d668946929 -> ProofGeneral/PG@e0ec3db200
Wilfred/helpful@4ba24cac9f -> Wilfred/helpful@5ad8a9ce57
agda/agda@3344ca8058 -> agda/agda@10a0ca0516
bastibe/org-journal@17b34ce8df -> bastibe/org-journal@115b9c0354
beancount/beancount-mode@452621fa1f -> beancount/beancount-mode@ddd4b87257
clojure-emacs/cider@f00e83d338 -> clojure-emacs/cider@a0d6169026
crystal-lang-tools/emacs-crystal-mode@ea89b108fa -> crystal-lang-tools/emacs-crystal-mode@d913fea6f0
emacs-ess/ESS@c72b911d70 -> emacs-ess/ESS@0eb240bcb6
emacs-geiser/geiser@74eed1669a -> emacs-geiser/geiser@c1c27072a4
emacs-lsp/lsp-haskell@6981f8d122 -> emacs-lsp/lsp-haskell@b2edf1a9f8
emacs-lsp/lsp-metals@6a6a345a8a -> emacs-lsp/lsp-metals@567089f7f4
emacs-rustic/rustic@e5c0271f1e -> emacs-rustic/rustic@fbbf0a7192
emacs-straight/auctex@f00256cbfd -> emacs-straight/auctex@53f80ba36c
emacs-straight/org-mode@5a4686915e -> emacs-straight/org-mode@ff33d9ec2e
emacs-typescript/typescript.el@dd10f702d4 -> emacs-typescript/typescript.el@481df3ad2c
emacsorphanage/dart-mode@02e919c1cf -> emacsorphanage/dart-mode@88b6683f43
emacsorphanage/macrostep@44faf4f7bf -> emacsorphanage/macrostep@d0928626b4
erlang/otp@3e7f126fe4 -> erlang/otp@64185e73b0
fuxialexander/org-pdftools@4e420233a1 -> fuxialexander/org-pdftools@5613b7ae56
greghendershott/racket-mode@f2645aadd2 -> greghendershott/racket-mode@eef5e9ab2c
hakimel/reveal.js@e15cf92ccd -> hakimel/reveal.js@2059d388f7
haskell/haskell-mode@1a285fc4c5 -> haskell/haskell-mode@7f452cc9e6
joaotavora/sly@742355f755 -> joaotavora/sly@c48defcf58
jorgenschaefer/emacs-buttercup@bf01a33f8b -> jorgenschaefer/emacs-buttercup@c467c659b2
jrblevin/markdown-mode@e100778594 -> jrblevin/markdown-mode@ee9d6de1d2
js-emacs/js2-refactor.el@a0977c4ce1 -> js-emacs/js2-refactor.el@e1177c728a
kaushalmodi/ox-hugo@98421a1298 -> kaushalmodi/ox-hugo@e3365cb4e6
ljos/jq-mode@a0f79eba78 -> ljos/jq-mode@eeb86b4d5a
magit/orgit@59d21fdb21 -> magit/orgit@3b6b34bd11
nonsequitur/inf-ruby@dad78a13f1 -> nonsequitur/inf-ruby@b8076aad10
ocaml/dune@098117d229 -> ocaml/dune@b74586e909
ocaml/merlin@3a806ef87f -> ocaml/merlin@92c3ba9473
oer/org-re-reveal@ab1422c163 -> oer/org-re-reveal@88e9d9e679
org-roam/org-roam@cad3518788 -> org-roam/org-roam@0037daaf3e
purescript-emacs/purescript-mode@07e4d6ecfe -> purescript-emacs/purescript-mode@b076bafe94
pythonic-emacs/anaconda-mode@f900bd7656 -> pythonic-emacs/anaconda-mode@5c6eff4645
pythonic-emacs/company-anaconda@169252fca7 -> pythonic-emacs/company-anaconda@0f7984b3be
pythonic-emacs/pyenv-mode@76787ea44f -> pythonic-emacs/pyenv-mode@f7d53796d6
seagle0128/grip-mode@df0ba7589d -> seagle0128/grip-mode@ffce7f78eb
swift-emacs/swift-mode@ab189d6e89 -> swift-emacs/swift-mode@2c0b2b72dc
technomancy/fennel-mode@3632cc77de -> technomancy/fennel-mode@4ccb6d5944
weijiangan/flycheck-golangci-lint@91c59b128a -> weijiangan/flycheck-golangci-lint@424ba1b3a1
2025-02-21 18:35:11 -05:00
..
2024-09-14 20:47:39 -04:00
2025-02-21 18:35:11 -05:00

:lang markdown

Description   unfold

This module provides Markdown support for Emacs.

Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

Thus, “Markdown” is two things: (1) a plain text formatting syntax; and (2) a software tool, written in Perl, that converts the plain text formatting to HTML. See the Syntax page for details pertaining to Markdown's formatting syntax. You can try it out, right now, using the online Dingus.

The overriding design goal for Markdown's formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown's syntax is the format of plain text email. John Gruber

Module flags

+grip
Enable grip support (on <localleader> p), to provide live github-style previews of your markdown (or org) files.

Hacks

  • doom-package:flyspell has been configured not to spell check in code blocks, links, HTML tags or references.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module requires:

  • A linter (requires doom-module::checkers syntax)
  • A markdown compiler, for previewing Markdown

Linters

Out of the box, flycheck recognizes these checkers for markdown-mode and gfm-mode:

  • Markdown-specific

  • General (natural language)

    • proselint

      • $ pip install proselint
      • Or through your OS package manager

        • MacOS: $ brew install proselint
        • Arch Linux: proselint in AUR
        • Debian & Ubuntu: $ apt-get install python3-proselint
        • Fedora: $ dnf install proselint
    • textlint ($ npm install textlint)

Markdown compiler

This module requires a markdown compiler in order for markdown-preview to work. It will recognize and use one of the following executables, in this order (you only need one):

  • markedjs: a markdown compiler "built for speed"
  • pandoc: the universal markup transpiler
  • markdown: there are various flavors of this compiler. This module will look for these two:

  • multimarkdown: a compiler for a language that is a superset of Markdown, with additional output formats and features.

MarkedJS

Not to be confused with the Marked 2 app, marked is an npm package:

npm install -g marked

Pandoc

Pandoc is the universal markup transpiler. It should be available through your system package manager. For example:

  • MacOS: $ brew install pandoc
  • Arch Linux: $ pacman -S pandoc

Markdown

The C implementation of Markdown.pl, called discount, is available through your OS's package manager:

  • MacOS: $ brew install discount
  • Arch Linux: $ pacman -S discount

The original perl script that discount is inspired from can be found on John Gruber's website.

MultiMarkdown

See its documentation for details on what MultiMarkdown is. The compiler can be installed through your OS's package manager:

  • MacOS: $ brew install multimarkdown
  • Arch Linux: multimarkdown is available on the AUR

Formatter

Formatting is handled using the doom-module::editor format module via prettier.

TODO Usage

󱌣 This module's usage documentation is incomplete. Complete it?

Markdown preview

markdown-preview is bound to <localleader> p. This will open a preview of your compiled markdown document in your browser.

Alternatively, you can use grip-mode through doom-module:+grip.

Configuration

󱌣 This module's configuration documentation is incomplete. Complete it?

Changing how markdown is compiled

When markdown-preview is invoked (<localleader> p) it consults markdown-command. Its default value (#'+markdown-compile) will consult +markdown-compile-functions: a list of functions that take three arguments: the start and end point in the current buffer to use as input, and an output buffer to insert the result in.

By default, the value of +markdown-compile-functions is:

'(+markdown-compile-marked
  +markdown-compile-pandoc
  +markdown-compile-markdown
  +markdown-compile-multimarkdown)

These functions will attempt to use the marked, pandoc and markdown executables, if available. Changing this variable will control how markdown is compiled:

;; Add a new one
(add-hook '+markdown-compile-functions #'my-compile-function)

;; Or remove an existing one
(remove-hook '+markdown-compile-functions #'+markdown-compile-markdown)

Otherwise, you can change markdown-command directly:

(setq markdown-command "markdown | smartypants")

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?