-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CodeEditorContribution syntax highlighting not working #128
Comments
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: {
"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
The text was updated successfully, but these errors were encountered: