Skip to content

Commit

Permalink
feat(vscode): add coffeescript syntax highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed May 13, 2024
1 parent 2149557 commit 3fea063
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"source.ts": "typescript",
"source.js.jsx": "javascriptreact",
"source.tsx": "typescriptreact",
"source.coffee": "coffeescript",
"meta.tag.js": "jsx-tags",
"meta.tag.tsx": "jsx-tags",
"meta.tag.without-attributes.js": "jsx-tags",
Expand Down Expand Up @@ -156,6 +157,7 @@
"source.ts": "typescript",
"source.js.jsx": "javascriptreact",
"source.tsx": "typescriptreact",
"source.coffee": "coffeescript",
"meta.tag.js": "jsx-tags",
"meta.tag.tsx": "jsx-tags",
"meta.tag.without-attributes.js": "jsx-tags",
Expand Down
32 changes: 32 additions & 0 deletions extensions/vscode/syntaxes/vue.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,38 @@
}
]
},
{
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)coffee\\b\\2)",
"beginCaptures": {
"1": {
"name": "entity.name.tag.$1.html.vue"
}
},
"end": "(</)(\\1)\\s*(?=>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html.vue"
},
"2": {
"name": "entity.name.tag.$2.html.vue"
}
},
"patterns": [
{
"include": "#tag-stuff"
},
{
"begin": "(?<=>)",
"end": "(?=<\\/)",
"name": "source.coffee",
"patterns": [
{
"include": "source.coffee"
}
]
}
]
},
{
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)json\\b\\2)",
"beginCaptures": {
Expand Down

0 comments on commit 3fea063

Please sign in to comment.