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

Emmet suggestions for jsx only when expicitly asked for #29532

上级 082ccc48
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
}, },
"emmet.includeLanguages": { "emmet.includeLanguages": {
"type": "object", "type": "object",
"default": {}, "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\"}" "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":{ "emmet.variables":{
"type": "object", "type": "object",
......
...@@ -26,7 +26,9 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi ...@@ -26,7 +26,9 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
syntax = this.syntaxHelper(syntax, document, position); 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; return;
} }
......
...@@ -20,7 +20,9 @@ export const LANGUAGE_MODES: Object = { ...@@ -20,7 +20,9 @@ export const LANGUAGE_MODES: Object = {
'scss': [':'], 'scss': [':'],
'sass': [':'], 'sass': [':'],
'less': [':'], 'less': [':'],
'stylus': [':'] 'stylus': [':'],
'javascriptreact': ['.', '}'],
'typescriptreact': ['.', '}']
}; };
// Explicitly map languages to their parent language to get emmet completion support // 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.
先完成此消息的编辑!
想要评论请 注册