Skip to content

Commit

Permalink
feat(marko): add Marko language grammar (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
fvsch authored Nov 6, 2023
1 parent f9ce73c commit db34763
Show file tree
Hide file tree
Showing 3 changed files with 1,162 additions and 0 deletions.
20 changes: 20 additions & 0 deletions grammars/grammars.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,26 @@
"aliases": ["Python", "py"],
"filenames": ["SConstruct", "SConscript"],
"firstLine": "^#!\\s*/?.*\\bpython[0-9.-]*\\b"
},
{
"language": "marko",
"scopeName": "text.marko",
"aliases": ["Marko", "marko"],
"extensions": [".marko"],
"grammar": {
"base": "marko",
"file": "marko.tmLanguage.json"
},
"configuration": {
"base": "marko",
"file": "language-configuration.json"
},
"embeddedLanguages": {
"source.css": "css",
"source.less": "less",
"source.scss": "scss",
"source.ts": "typescript"
}
}
],
"grammars": [
Expand Down
44 changes: 44 additions & 0 deletions grammars/marko/language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"comments": {
"blockComment": ["<!--", "-->"]
},
"brackets": [
["<!--", "-->"],
["${", "}"],
["<", ">"],
["{", "}"],
["(", ")"],
["[", "]"],
["|", "|"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "|", "close": "|" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
{ "open": "<!--", "close": "-->", "notIn": ["string", "comment"] },
{ "open": "/**", "close": " */", "notIn": ["string", "comment"] }
],
"autoCloseBefore": ";:.,=}])><`'\" \n\t",
"surroundingPairs": [
{ "open": "'", "close": "'" },
{ "open": "\"", "close": "\"" },
{ "open": "`", "close": "`" },
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "|", "close": "|" },
{ "open": "<", "close": ">" }
],
"colorizedBracketPairs": [],
"folding": {
"markers": {
"start": "^\\s*<!--\\s*#region\\b.*-->",
"end": "^\\s*<!--\\s*#endregion\\b.*-->"
}
},
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)"
}
Loading

0 comments on commit db34763

Please sign in to comment.