Open mmeester opened 1 year ago
Did you ever manage to get this working?
This seems to be how you declare the syntax highlighting now I think. You don't even need to do any typescript but would need to convert the Monaco syntax into the contribution properties... Would be good if these examples were kept up to date and is functional...
From this repo: https://github.com/SuperNowyNick/az-devops-bpmn-tools/blob/913a2cfb6a0680c4e1537c461a98ed34a8a17107/vss-extension.json
{
"id": "bpmn-language",
"type": "ms.vss-features.code-editor-language",
"description": "Add BPMN syntax highlighting",
"targets": ["ms.vss-features.editor"],
"properties": {
"extensions": [".bpmn"],
"mimetypes": ["application/bpmn+xml"],
"language": {
"displayName": "BPMN",
"defaultToken": "",
"tokenPostfix": ".bpmn",
"ignoreCase": true,
"tokenizer": {
"root": [
["<\\?xml", "metatag", "@xmlInfo"],
["<!--", "comment", "@comment"],
[
"(<)(\\w+)",
[
"delimiter",
{ "token": "tag", "next": "@bpmn" }
]
],
[
"(<\\/)(\\w+)(:)(\\w+)",
["delimiter", "tag", "delimiter", "type"]
],
["</", "delimiter"],
["\\/>", "delimiter"],
["[^<]+"]
],
"xmlInfo": [
[">", "metatag", "@pop"],
["[^>]+", "metatag.content"]
],
"comment": [
["-->", "comment", "@pop"],
["[^-]+", "comment.content"],
[".", "comment.content"]
],
"bpmn": [
["(:)(\\w+)", ["delimiter", "type"]],
["\"([^\"]*)\"", "attribute.value"],
["'([^\"]*)'", "attribute.value"],
["([\\w\\-]+)(=)", ["attribute.name", "delimiter"]],
["\\/?>", "delimiter", "@pop"]
]
}
}
}
}
Managed to get it to work doing this syntax.
I'm trying to get the CodeEditorContribution sample to work to have syntax highlighted in repos, but whatever I try it's not working and my code looks like being plain text all the time