Skip to content

Commit db34763

Browse files
authored
feat(marko): add Marko language grammar (#3)
1 parent f9ce73c commit db34763

3 files changed

Lines changed: 1162 additions & 0 deletions

File tree

grammars/grammars.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,26 @@
419419
"aliases": ["Python", "py"],
420420
"filenames": ["SConstruct", "SConscript"],
421421
"firstLine": "^#!\\s*/?.*\\bpython[0-9.-]*\\b"
422+
},
423+
{
424+
"language": "marko",
425+
"scopeName": "text.marko",
426+
"aliases": ["Marko", "marko"],
427+
"extensions": [".marko"],
428+
"grammar": {
429+
"base": "marko",
430+
"file": "marko.tmLanguage.json"
431+
},
432+
"configuration": {
433+
"base": "marko",
434+
"file": "language-configuration.json"
435+
},
436+
"embeddedLanguages": {
437+
"source.css": "css",
438+
"source.less": "less",
439+
"source.scss": "scss",
440+
"source.ts": "typescript"
441+
}
422442
}
423443
],
424444
"grammars": [
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"comments": {
3+
"blockComment": ["<!--", "-->"]
4+
},
5+
"brackets": [
6+
["<!--", "-->"],
7+
["${", "}"],
8+
["<", ">"],
9+
["{", "}"],
10+
["(", ")"],
11+
["[", "]"],
12+
["|", "|"]
13+
],
14+
"autoClosingPairs": [
15+
{ "open": "{", "close": "}" },
16+
{ "open": "[", "close": "]" },
17+
{ "open": "(", "close": ")" },
18+
{ "open": "|", "close": "|" },
19+
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
20+
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
21+
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
22+
{ "open": "<!--", "close": "-->", "notIn": ["string", "comment"] },
23+
{ "open": "/**", "close": " */", "notIn": ["string", "comment"] }
24+
],
25+
"autoCloseBefore": ";:.,=}])><`'\" \n\t",
26+
"surroundingPairs": [
27+
{ "open": "'", "close": "'" },
28+
{ "open": "\"", "close": "\"" },
29+
{ "open": "`", "close": "`" },
30+
{ "open": "{", "close": "}" },
31+
{ "open": "[", "close": "]" },
32+
{ "open": "(", "close": ")" },
33+
{ "open": "|", "close": "|" },
34+
{ "open": "<", "close": ">" }
35+
],
36+
"colorizedBracketPairs": [],
37+
"folding": {
38+
"markers": {
39+
"start": "^\\s*<!--\\s*#region\\b.*-->",
40+
"end": "^\\s*<!--\\s*#endregion\\b.*-->"
41+
}
42+
},
43+
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)"
44+
}

0 commit comments

Comments
 (0)