{"id":47865981,"url":"https://github.com/dnouri/md-ts-mode","last_synced_at":"2026-04-04T00:14:01.337Z","repository":{"id":341684374,"uuid":"1169648768","full_name":"dnouri/md-ts-mode","owner":"dnouri","description":"A Emacs major mode for Markdown, powered by tree-sitter, works on Emacs 29+","archived":false,"fork":false,"pushed_at":"2026-03-02T23:05:59.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-03T00:35:50.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnouri.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-01T01:50:54.000Z","updated_at":"2026-03-02T23:04:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dnouri/md-ts-mode","commit_stats":null,"previous_names":["dnouri/md-ts-mode"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dnouri/md-ts-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnouri%2Fmd-ts-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnouri%2Fmd-ts-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnouri%2Fmd-ts-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnouri%2Fmd-ts-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnouri","download_url":"https://codeload.github.com/dnouri/md-ts-mode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnouri%2Fmd-ts-mode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31382390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T23:20:52.058Z","status":"ssl_error","status_checked_at":"2026-04-03T23:20:51.675Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T00:13:58.254Z","updated_at":"2026-04-04T00:14:01.323Z","avatar_url":"https://github.com/dnouri.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+title: md-ts-mode\n#+author: Daniel Nouri\n\n#+html: \u003ca href=\"https://melpa.org/#/md-ts-mode\"\u003e\u003cimg alt=\"MELPA\" src=\"https://melpa.org/packages/md-ts-mode-badge.svg\"/\u003e\u003c/a\u003e\n#+html: \u003ca href=\"https://github.com/dnouri/md-ts-mode/actions/workflows/test.yml\"\u003e\u003cimg alt=\"Tests\" src=\"https://github.com/dnouri/md-ts-mode/actions/workflows/test.yml/badge.svg\"/\u003e\u003c/a\u003e\n#+html: \u003ca href=\"https://github.com/dnouri/md-ts-mode/actions/workflows/melpazoid.yml\"\u003e\u003cimg alt=\"melpazoid\" src=\"https://github.com/dnouri/md-ts-mode/actions/workflows/melpazoid.yml/badge.svg\"/\u003e\u003c/a\u003e\n\n~md-ts-mode~ is a tree-sitter-based major mode for editing Markdown.\nIt is derived from ~markdown-ts-mode~ in GNU Emacs 31 and works on\nEmacs 29, 30, and 31.\n\n** Features\n\n- Syntax highlighting for headings (atx and setext), emphasis, strong\n  emphasis, strikethrough (=~~deleted~~=), code spans, links (inline,\n  full reference, collapsed reference, shortcut), images, block\n  quotes, list markers, and indented code blocks.\n- Task list markers (=[ ]=, =[x]=) rendered as checkbox glyphs (☐, ☑).\n- Thematic breaks (=---=, =***=, =___=) rendered as horizontal rules.\n- Pipe tables with bold headers, subdued delimiter rows, and inline\n  markup (emphasis, code, links) fontified inside cells.\n- HTML blocks highlighted with ~font-lock-doc-face~.\n- Fenced code blocks fontified by the corresponding language grammar\n  when available.\n- YAML and TOML front matter fontified when their grammars are\n  available.\n- Hide-markup mode: ~md-ts-toggle-hide-markup~ hides delimiters\n  (=#=, =*=, =~=, brackets, URLs) so only content is visible.\n- Imenu and ~outline-minor-mode~ integration via headings.\n- Custom faces: ~md-ts-heading-1~ through ~md-ts-heading-6~,\n  ~md-ts-setext-heading~, ~md-ts-delimiter~, ~md-ts-list-marker~,\n  ~md-ts-block-quote~, ~md-ts-strikethrough~,\n  ~md-ts-language-keyword~, and ~md-ts-task-list-marker~.\n\n\n** Requirements\n\n- GNU Emacs 29.1 or later, built with tree-sitter support.\n- Tree-sitter grammars: ~markdown~ and ~markdown-inline~ from\n  [[https://github.com/tree-sitter-grammars/tree-sitter-markdown][tree-sitter-markdown]] (version 0.4.1 or compatible).\n\n\n** Installation\n\nInstall from [[https://melpa.org/#/md-ts-mode][MELPA]]:\n\n#+begin_src\nM-x package-install RET md-ts-mode RET\n#+end_src\n\nOr with =use-package=:\n\n#+begin_src emacs-lisp\n(use-package md-ts-mode\n  :ensure t)\n#+end_src\n\nIf you do not already have MELPA configured, add this to your init\nfile:\n\n#+begin_src emacs-lisp\n(require 'package)\n(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)\n(package-initialize)\n#+end_src\n\nInstalling or loading ~md-ts-mode~ does not change how Markdown files\nare chosen globally.  If you want ~md-ts-mode~ to handle Markdown\nexplicitly, add:\n\n#+begin_src emacs-lisp\n(md-ts-mode-enable-global)\n#+end_src\n\nThe helper is autoloaded and idempotent.  On Emacs 31 it also prefers\n~md-ts-mode~ over the built-in ~markdown-ts-mode~.\n\n*** Install tree-sitter grammars\n\nAfter loading ~md-ts-mode~ once, install the Markdown grammars:\n\n#+begin_example\nM-x treesit-install-language-grammar RET markdown RET\nM-x treesit-install-language-grammar RET markdown-inline RET\n#+end_example\n\nIf only part of a file is highlighted, one of the grammars is probably\nmissing.\n\n\n** Embedded code blocks\n\nFenced code blocks with a language tag (e.g., =```python=) are\nparsed and fontified by the corresponding language grammar.\nInstall the grammar for any language you want highlighted:\n\n#+begin_example\n  M-x treesit-install-language-grammar RET python RET\n#+end_example\n\nThe variable ~md-ts-code-block-source-mode-map~ maps language\nsymbols to their tree-sitter major modes.  The mode must be\ninstalled and its grammar available for highlighting to work.\n\n\n** Compatibility\n\nThe compatibility shims in ~md-ts-mode.el~ backport Emacs 31\ntree-sitter range infrastructure to Emacs 29 and 30.  This\nincludes replacements for ~treesit-range-fn-exclude-children~,\n~treesit-query-range~ (with ~RANGE-FN~ argument),\n~treesit-range-rules~ (with ~:range-fn~ keyword and function-form\n~:embed~), ~treesit-update-ranges~, and\n~treesit--update-ranges-local~.\n\nOn Emacs 29, additional shims provide ~treesit-node-children~,\n~derived-mode-add-parents~, and wrappers for C functions whose\nsignatures changed in Emacs 30 (~treesit-parser-create~,\n~treesit-parser-list~).\n\nOn Emacs 31 all guards are false and no shims are defined.\n\nTested on Emacs 29.4, 30.1, and development snapshot (31).\n\n\n** Acknowledgments\n\nBased on ~markdown-ts-mode~ from GNU Emacs 31, originally written\nby Rahul Martim Juliato.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnouri%2Fmd-ts-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnouri%2Fmd-ts-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnouri%2Fmd-ts-mode/lists"}