All work

myPython

Python with Markdown in docstrings, full regex support, and type-checker comments.

Source on GitLab Sublime Text · MPL-2.0 · v0.7.0
Stock Sublime
Lines 159 to 185 of a Python module, inside the docstring of a result class: field names, their descriptions, and ``code spans``, one flat grey string under stock Python highlighting.
myPython
The same lines with myPython: each field name (rung, fuzz, line_range) in orange, the ``code spans`` as highlighted chips, and the descriptions in a quieter grey.

A small extension of Sublime's Python grammar. Docstrings get MyST Markdown highlighting, raw strings get my full regex grammar, and type-checker comments (ty, pyright, pyrefly, mypy, noqa) get their own scopes.

It only overrides the contexts it needs to, so everything else about Python highlighting stays exactly as Sublime ships it.

How the fleet's Sublime syntaxes embed and extend one another. Five syntax repos are drawn as panels: python, myst, regex, metasyntax, and yaml. Cyan arrows are embeds or pushes into another syntax, labelled with the number of sites in the source; violet arrows are extends, and each name carries the stock package it extends. myPython pushes into myRegex at 12 sites and embeds MystDocstrings at 3; the MyST Typst grammar embeds myPython and myRegex, MystMarkdown pushes into myRegex at 3 sites, and HTML (Jinja) embeds the TOML_Jinja grammar from the python repo. Metasyntax pushes into the double-brace variant of myRegex at 3 sites. myRegex is extended by a templates variant, which a double-brace variant extends. In the yaml repo BashYAML embeds EmbeddedBash at 2 sites and EmbeddedFlowBash at 1, EmbeddedFlowBash and myZsh both extend EmbeddedBash, and nothing else in the fleet references the yaml syntaxes. The project this copy belongs to is drawn in amber. sublime-python-syntax sublime-myst-syntax sublime-regex-syntax sublime-meta-syntax sublime-yaml-syntax TOML_Jinja extends TOML myPython extends Python HTML (Jinja) extends HTML MystDocstrings extends MystMarkdown Typst no extends MystMarkdown extends Markdown myRegex no extends _MyRegexTemplates extends myRegex _MyRegexDoubleBraces extends _MyRegexTemplates Metasyntax extends YAML BashYAML extends YAML EmbeddedFlowBash extends EmbeddedBash EmbeddedBash extends Bash myZsh extends Zsh, EmbeddedBash extends ×1 ×3 ×1 ×12 ×1 ×3 ×3 ×1 ×2 embeds or pushes into another syntax, ×N sites extends a parent syntax