Skip to content

Commit

Permalink
Introduce higher-fidelity TextMate grammar+theme loader.
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinfest committed Jul 21, 2020
1 parent 116a43d commit ffc44ca
Show file tree
Hide file tree
Showing 18 changed files with 6,438 additions and 13,973 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -10,5 +10,5 @@ https://github.com/microsoft/monaco-editor/issues/1915.
- `yarn demo`
- open http://localhost:8084/

This shows off the Hack grammar working by default, as it is a language for
which a TextMate grammar exists, but no Monarch grammar.
Currently, only the Python grammar and VS Code Dark+ themes are included in the
demo.
135 changes: 135 additions & 0 deletions configurations/python.json
@@ -0,0 +1,135 @@
{
"comments": {
"lineComment": "#",
"blockComment": ["\"\"\"", "\"\"\""]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{
"open": "{",
"close": "}"
},
{
"open": "[",
"close": "]"
},
{
"open": "(",
"close": ")"
},
{
"open": "\"",
"close": "\"",
"notIn": ["string"]
},
{
"open": "r\"",
"close": "\"",
"notIn": ["string", "comment"]
},
{
"open": "R\"",
"close": "\"",
"notIn": ["string", "comment"]
},
{
"open": "u\"",
"close": "\"",
"notIn": ["string", "comment"]
},
{
"open": "U\"",
"close": "\"",
"notIn": ["string", "comment"]
},
{
"open": "f\"",
"close": "\"",
"notIn": ["string", "comment"]
},
{
"open": "F\"",
"close": "\"",
"notIn": ["string", "comment"]
},
{
"open": "b\"",
"close": "\"",
"notIn": ["string", "comment"]
},
{
"open": "B\"",
"close": "\"",
"notIn": ["string", "comment"]
},
{
"open": "'",
"close": "'",
"notIn": ["string", "comment"]
},
{
"open": "r'",
"close": "'",
"notIn": ["string", "comment"]
},
{
"open": "R'",
"close": "'",
"notIn": ["string", "comment"]
},
{
"open": "u'",
"close": "'",
"notIn": ["string", "comment"]
},
{
"open": "U'",
"close": "'",
"notIn": ["string", "comment"]
},
{
"open": "f'",
"close": "'",
"notIn": ["string", "comment"]
},
{
"open": "F'",
"close": "'",
"notIn": ["string", "comment"]
},
{
"open": "b'",
"close": "'",
"notIn": ["string", "comment"]
},
{
"open": "B'",
"close": "'",
"notIn": ["string", "comment"]
},
{
"open": "`",
"close": "`",
"notIn": ["string"]
}
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"],
["`", "`"]
],
"folding": {
"offSide": true,
"markers": {
"start": "^\\s*#\\s*region\\b",
"end": "^\\s*#\\s*endregion\\b"
}
}
}

0 comments on commit ffc44ca

Please sign in to comment.