Skip to content

Commit e102387

Browse files
TextMate rules for Markdown math formula syntax highlighting (#222)
VS Code 1.58 [1] (June 2021) introduced syntax highlighting for Markdown math formulas [2]. To adapt the coloring to Nord's style new TextMate rules with the following scopes have been added: - `text.html.markdown constant.character.math.tex` - targets constants like `\displaystyle` and `\left`. - `text.html.markdown constant.character.math.tex` - targets `$$` definition markers. - `text.html.markdown punctuation.definition.function.math.tex` - targets the `\` (backslash) function definition marker. - `text.html.markdown punctuation.math.operator.latex` - targets operators like `=`. [1]: https://code.visualstudio.com/updates/v1_58 [2]: https://code.visualstudio.com/updates/v1_58#_markdown-math-formula-syntax-highlighting Co-authored-by: Sven Greb <[email protected]> Closes GH-221
1 parent 373729a commit e102387

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

themes/nord-color-theme.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,37 @@
10951095
"foreground": "#616E88"
10961096
}
10971097
},
1098+
{
1099+
"name": "[Markdown] Markup Math Constant",
1100+
"scope": "text.html.markdown constant.character.math.tex",
1101+
"settings": {
1102+
"foreground": "#81A1C1"
1103+
}
1104+
},
1105+
{
1106+
"name": "[Markdown] Markup Math Definition Marker",
1107+
"scope": [
1108+
"text.html.markdown punctuation.definition.math.begin",
1109+
"text.html.markdown punctuation.definition.math.end"
1110+
],
1111+
"settings": {
1112+
"foreground": "#5E81AC"
1113+
}
1114+
},
1115+
{
1116+
"name": "[Markdown] Markup Math Function Definition Marker",
1117+
"scope": "text.html.markdown punctuation.definition.function.math.tex",
1118+
"settings": {
1119+
"foreground": "#88C0D0"
1120+
}
1121+
},
1122+
{
1123+
"name": "[Markdown] Markup Math Operator",
1124+
"scope": "text.html.markdown punctuation.math.operator.latex",
1125+
"settings": {
1126+
"foreground": "#81A1C1"
1127+
}
1128+
},
10981129
{
10991130
"name": "[Markdown] Punctuation Definition Heading",
11001131
"scope": "text.html.markdown punctuation.definition.heading",

0 commit comments

Comments
 (0)