Variable: markdown-ts-code-block-modes

markdown-ts-code-block-modes is a variable defined in markdown-ts-mode.el.gz.

Value

((sh bash-ts-mode) (shell bash-ts-mode) (c\# csharp-ts-mode)
 (cpp c++-ts-mode) (el emacs-lisp-mode) (elisp emacs-lisp-mode)
 (golang go-ts-mode) (gomod go-mod-ts-mode) (gowork go-work-ts-mode)
 (javascript js-ts-mode) (md markdown-ts-mode) (py python-ts-mode)
 (rb ruby-ts-mode) (rs rust-ts-mode) (tex latex-mode)
 (ts typescript-ts-mode) (yml yaml-ts-mode))

Documentation

Extra mappings from code block language tags to major modes.

Entries here are only needed when the language tag in a fenced code block does NOT match the conventional mode name derivation, e.g. the user writes ```ts instead of ```typescript, or
```py instead of ```python. For tags that already
resolve via the standard "-ts-mode"/"-mode" heuristics there is no need to add an entry.

The alist is of the form (LANGUAGE MAJOR-MODE). MAJOR-MODE can be a tree-sitter or a conventional mode.

If you prefer a conventional mode over its tree-sitter variant, add or replace relevant entries. For example:

    (add-to-list 'markdown-ts-code-block-modes
      '(python python-mode))
    (setf (alist-get 'py markdown-ts-code-block-modes)
          '(python-mode))

Code blocks for that non tree-sitter modes will be fontified using the mode's conventional font-lock rules.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defvar markdown-ts-code-block-modes
  `((sh bash-ts-mode)
    (shell bash-ts-mode)
    (,(intern "c#") csharp-ts-mode)
    (cpp c++-ts-mode)
    (el emacs-lisp-mode)
    (elisp emacs-lisp-mode)
    (golang go-ts-mode)
    (gomod go-mod-ts-mode)
    (gowork go-work-ts-mode)
    (javascript js-ts-mode)
    (md markdown-ts-mode)
    (py python-ts-mode)
    (rb ruby-ts-mode)
    (rs rust-ts-mode)
    (tex latex-mode)
    (ts typescript-ts-mode)
    (yml yaml-ts-mode))
  "Extra mappings from code block language tags to major modes.
Entries here are only needed when the language tag in a fenced code
block does NOT match the conventional mode name derivation, e.g. the
user writes \\=`\\=`\\=`ts instead of \\=`\\=`\\=`typescript, or
\\=`\\=`\\=`py instead of \\=`\\=`\\=`python.  For tags that already
resolve via the standard \"-ts-mode\"/\"-mode\" heuristics there is no
need to add an entry.

The alist is of the form (LANGUAGE MAJOR-MODE). MAJOR-MODE can be a
tree-sitter or a conventional mode.

If you prefer a conventional mode over its tree-sitter variant, add or
replace relevant entries.  For example:

    (add-to-list \\='markdown-ts-code-block-modes
      \\='(python python-mode))
    (setf (alist-get \\='py markdown-ts-code-block-modes)
          \\='(python-mode))

Code blocks for that non tree-sitter modes will be fontified using the
mode's conventional font-lock rules.")