Function: markdown-ts-mode
markdown-ts-mode is an autoloaded, interactive and byte-compiled
function defined in markdown-ts-mode.el.gz.
Signature
(markdown-ts-mode)
Documentation
Major mode for editing Markdown using tree-sitter grammar.
In addition to any hooks its parent mode text-mode might have run,
this mode runs the hook markdown-ts-mode-hook, as the final or
penultimate step during initialization.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
;;;###autoload
(define-derived-mode markdown-ts-mode text-mode "Markdown"
"Major mode for editing Markdown using tree-sitter grammar."
(setq-local comment-start "<!-- ")
(setq-local comment-end " -->")
(setq-local font-lock-defaults nil
treesit-font-lock-feature-list '((delimiter heading)
(paragraph)
(paragraph-inline)))
(setq-local treesit-simple-imenu-settings
`(("Headings" ,#'markdown-ts-imenu-node-p
nil ,#'markdown-ts-imenu-name-function)))
(setq-local treesit-outline-predicate #'markdown-ts-outline-predicate)
(when (and (treesit-ensure-installed 'markdown)
(treesit-ensure-installed 'markdown-inline))
(treesit-parser-create 'markdown-inline)
(treesit-parser-create 'markdown)
(markdown-ts-setup)))