[jsx][tsx] Wrong type of comments for React code. Fixes #6461

This commit is contained in:
Martin Aeschlimann 2017-01-04 23:12:56 -04:00
parent db859bf0eb
commit d826ad6e4f
4 changed files with 48 additions and 5 deletions

View file

@ -27,7 +27,7 @@
"extensions": [
".jsx"
],
"configuration": "./language-configuration.json"
"configuration": "./javascript-language-configuration.json"
},
{
"id": "javascript",
@ -47,19 +47,31 @@
"mimetypes": [
"text/javascript"
],
"configuration": "./language-configuration.json"
"configuration": "./javascript-language-configuration.json"
},
{
"id": "jsx-tags",
"configuration": "./tags-language-configuration.json"
}
],
"grammars": [
{
"language": "javascriptreact",
"scopeName": "source.js",
"path": "./syntaxes/JavaScript.tmLanguage.json"
"path": "./syntaxes/JavaScript.tmLanguage.json",
"embeddedLanguages": {
"meta.tag.js": "jsx-tags",
"meta.tag.without-attributes.js": "jsx-tags"
}
},
{
"language": "javascript",
"scopeName": "source.js",
"path": "./syntaxes/JavaScript.tmLanguage.json"
"path": "./syntaxes/JavaScript.tmLanguage.json",
"embeddedLanguages": {
"meta.tag.js": "jsx-tags",
"meta.tag.without-attributes.js": "jsx-tags"
}
},
{
"scopeName": "source.js.regexp",

View file

@ -0,0 +1,27 @@
{
"comments": {
"blockComment": [ "{/*", "*/}" ]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"],
["<", ">"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "/**", "close": " */", "notIn": ["string"] }
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["<", ">"],
["'", "'"],
["\"", "\""]
]
}

View file

@ -68,7 +68,11 @@
{
"language": "typescriptreact",
"scopeName": "source.tsx",
"path": "./syntaxes/TypeScriptReact.tmLanguage.json"
"path": "./syntaxes/TypeScriptReact.tmLanguage.json",
"embeddedLanguages": {
"meta.tag.tsx": "jsx-tags",
"meta.tag.without-attributes.tsx": "jsx-tags"
}
}
],
"configuration": {