From c5c70fc8766284be3e4801172b99d4569307d242 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Sun, 30 Jul 2017 16:29:31 -0700 Subject: [PATCH] Move emmet config to extension --- extensions/emmet/package.json | 25 +++++++++++++++---- extensions/emmet/package.nls.json | 9 ++++++- .../electron-browser/emmet.contribution.ts | 15 ----------- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json index 482ef44988c21..45d95fd764bae 100644 --- a/extensions/emmet/package.json +++ b/extensions/emmet/package.json @@ -33,18 +33,18 @@ "inMarkupAndStylesheetFilesOnly" ], "default": "inMarkupAndStylesheetFilesOnly", - "description": "Applicable only when emmet.useNewEmmet is set to true.\nShows expanded emmet abbreviations as suggestions.\nThe option \"inMarkupAndStylesheetFilesOnly\" applies to html, haml, jade, slim, xml, xsl, css, scss, sass, less and stylus.\nThe option \"always\" applies to all parts of the file regardless of markup/css." + "description": "%emmetShowExpandedAbbreviation%" }, "emmet.showAbbreviationSuggestions": { "type": "boolean", "default": true, - "description": "Applicable only when emmet.useNewEmmet is set to true.\nShows possible emmet abbreviations as suggestions. Not applicable in stylesheets or when emmet.showExpandedAbbreviation is set to \"never\"." + "description": "%emmetShowAbbreviationSuggestions%" }, "emmet.includeLanguages": { "type": "object", "default": {}, - "description": "Applicable only when emmet.useNewEmmet is set to true.\nEnable emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and emmet supported language.\n Eg: {\"vue-html\": \"html\", \"javascript\": \"javascriptreact\"}" - }, + "description": "%emmetIncludeLanguages%" + }, "emmet.variables": { "type": "object", "properties": { @@ -58,7 +58,22 @@ } }, "default": {}, - "description": "Applicable only when emmet.useNewEmmet is set to true.\nVariables to be used in emmet snippets" + "description": "%emmetVariables%" + }, + "emmet.syntaxProfiles":{ + "type": "object", + "default": {}, + "description": "%emmetSyntaxProfiles%" + }, + "emmet.excludeLanguages":{ + "type": "array", + "default": ["markdown"], + "description": "%emmetExclude%" + }, + "emmet.extensionsPath": { + "type": "string", + "default": null, + "description": "%emmetExtensionsPath%" } } }, diff --git a/extensions/emmet/package.nls.json b/extensions/emmet/package.nls.json index 79a18e731d7f0..bb388b9ceb991 100644 --- a/extensions/emmet/package.nls.json +++ b/extensions/emmet/package.nls.json @@ -19,5 +19,12 @@ "command.incrementNumberByOneTenth": "Increment by 0.1", "command.decrementNumberByOneTenth": "Decrement by 0.1", "command.incrementNumberByTen": "Increment by 10", - "command.decrementNumberByTen": "Decrement by 10" + "command.decrementNumberByTen": "Decrement by 10", + "emmetSyntaxProfiles": "Define profile for specified syntax or use your own profile with specific rules.", + "emmetExclude": "An array of languages where emmet abbreviations should not be expanded.", + "emmetExtensionsPath": "Path to a folder containing emmet profiles, snippets and preferences. Only profiles are honored from extensions path when emmet.useNewEmmet is set to true.'", + "emmetShowExpandedAbbreviation": "Shows expanded emmet abbreviations as suggestions.\nThe option \"inMarkupAndStylesheetFilesOnly\" applies to html, haml, jade, slim, xml, xsl, css, scss, sass, less and stylus.\nThe option \"always\" applies to all parts of the file regardless of markup/css.", + "emmetShowAbbreviationSuggestions": "Shows possible emmet abbreviations as suggestions. Not applicable in stylesheets or when emmet.showExpandedAbbreviation is set to \"never\".", + "emmetIncludeLanguages": "Enable emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and emmet supported language.\n Eg: {\"vue-html\": \"html\", \"javascript\": \"javascriptreact\"}", + "emmetVariables": "Variables to be used in emmet snippets" } \ No newline at end of file diff --git a/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts b/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts index f1624b4334d64..3950d72f77099 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts @@ -31,21 +31,6 @@ configurationRegistry.registerConfiguration({ 'default': {}, 'description': nls.localize('emmetPreferences', "Preferences used to modify behavior of some actions and resolvers of Emmet. Not applicable when emmet.useNewemmet is set to true.") }, - 'emmet.syntaxProfiles': { - 'type': 'object', - 'default': {}, - 'description': nls.localize('emmetSyntaxProfiles', "Define profile for specified syntax or use your own profile with specific rules.") - }, - 'emmet.excludeLanguages': { - 'type': 'array', - 'default': ['markdown'], - 'description': nls.localize('emmetExclude', "An array of languages where emmet abbreviations should not be expanded.") - }, - 'emmet.extensionsPath': { - 'type': 'string', - 'default': null, - 'description': nls.localize('emmetExtensionsPath', 'Path to a folder containing emmet profiles, snippets and preferences. Only profiles are honored from extensions path when emmet.useNewEmmet is set to true.') - }, 'emmet.useNewEmmet': { 'type': 'boolean', 'default': true,