]> git.eshelyaron.com Git - emacs.git/commit
Expand markdown-ts-mode and add code block support for javascript
authorYuan Fu <casouri@gmail.com>
Wed, 12 Mar 2025 03:37:43 +0000 (20:37 -0700)
committerEshel Yaron <me@eshelyaron.com>
Wed, 16 Apr 2025 07:38:33 +0000 (09:38 +0200)
commit10839600a4c1b87f99652ab3d5e7468683b0b5d9
tree4193b46fb16ba455e368004ae5230f17c17eff57
parent462520018e7008e1f4f5a341075de48b17e91e67
Expand markdown-ts-mode and add code block support for javascript

- Define new faces and use them in place of font-lock faces
- Add more fontification, add a new feature for headings.
- Remove fontification for code blocks, so embedeed parser can
  fontify them
- Add experimental code block support for javascript by using
  tree-sitter setup from js-ts-mode.
- Correctly setup markdown_inline with range settings.

* lisp/textmodes/markdown-ts-mode.el:
(markdown-ts--code-block-language-map):
(markdown-ts-code-block-source-mode-map): New variables.
(markdown-ts-faces): New group.
(markdown-ts-delimiter):
(markdown-ts-heading-1):
(markdown-ts-setext-heading):
(markdown-ts-heading-2):
(markdown-ts-heading-3):
(markdown-ts-heading-4):
(markdown-ts-heading-5):
(markdown-ts-heading-6):
(markdown-ts-list-marker):
(markdown-ts-block-quote):
(markdown-ts-language-keyword): New faces.
(markdown-ts--treesit-settings):
(markdown-ts--configured-languages): New variables.
(markdown-ts--harvest-treesit-configs):
(markdown-ts--add-config-for-mode):
(markdown-ts--convert-code-block-language): New functions.
(markdown-ts--range-settings): New variable.
(markdown-ts-setup): Setup range configuration.
(markdown-ts-mode): Add heading feature.

(cherry picked from commit 6f1e317764dab918d40b08d2e8e9166d42ae6c8d)
lisp/textmodes/markdown-ts-mode.el