mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-08 23:32:36 -05:00
Emmet suggestions for jsx only when expicitly asked for #29532
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user