提交 04f25df8 编写于 作者: R Ramya Achutha Rao

Emmet suggestions for jsx only when expicitly asked for #29532

上级 082ccc48
......@@ -40,8 +40,8 @@
},
"emmet.includeLanguages": {
"type": "object",
"default": {},
"description": "Enable emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and emmet supported syntax.\n Eg: {\"php\": \"html\"}"
"default": {},
"description": "Enable emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and emmet supported language.\n Eg: {\"php\": \"html\", \"javascript\": \"javascriptreact\"}"
},
"emmet.variables":{
"type": "object",
......
......@@ -26,7 +26,9 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
syntax = this.syntaxHelper(syntax, document, position);
}
if (!syntax || (isSyntaxMapped && vscode.workspace.getConfiguration('emmet')['showExpandedAbbreviation'] !== 'always')) {
if (!syntax
|| ((isSyntaxMapped || syntax === 'jsx')
&& vscode.workspace.getConfiguration('emmet')['showExpandedAbbreviation'] !== 'always')) {
return;
}
......
......@@ -20,7 +20,9 @@ export const LANGUAGE_MODES: Object = {
'scss': [':'],
'sass': [':'],
'less': [':'],
'stylus': [':']
'stylus': [':'],
'javascriptreact': ['.', '}'],
'typescriptreact': ['.', '}']
};
// Explicitly map languages to their parent language to get emmet completion support
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册