I am trying to extend the AL language from Microsoft by adding regions. I can do this manually by going to the vscode extension folder .vscode\extensions\Microsoft.al-0.14.17461 and changing the file al.configuration.json and alsyntax.tmlanguage.
But I want to do this by creating my own VSCode extension. So I created my own extension and copied those specific files to it + adding my specific code. And luckily it worked!
However it only works if I use the entire syntax files and not just with my specific code..
Below is the code of the al.configuration.json, its the folding part between ** that I want to add.
{
**"folding": {
"markers": {
"start": "^\\s*//\\s*#region\\b",
"end": "^\\s*//\\s*#endregion\\b"
}**
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"],
["BEGIN", "END;"],
["begin", "end;"],
["Begin", "End;"]
],
"autoClosingPairs": [
{ "open": "BEGIN", "close": "END;", "notIn": ["string", "comment"] },
{ "open": "begin", "close": "end;", "notIn": ["string", "comment"] },
{ "open": "Begin", "close": "End;", "notIn": ["string", "comment"] },
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string"] }
],
"surroundingPairs": [
["'", "'"],
["\"", "\""]
],
"wordPattern": "(\"(?:(?:\\\"\\\")|[^\\\"])*\")|(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)"
}