diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 0146d8c3148..fa004fba308 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -289,20 +289,20 @@ const editorConfiguration: IConfigurationNode = { 'minimum': 1, 'markdownDescription': nls.localize('tabSize', "The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.") }, - 'editor.indentSize': { - 'anyOf': [ - { - 'type': 'string', - 'enum': ['tabSize'] - }, - { - 'type': 'number', - 'minimum': 1 - } - ], - 'default': 'tabSize', - 'markdownDescription': nls.localize('indentSize', "The number of spaces used for indentation or 'tabSize' to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.") - }, + // 'editor.indentSize': { + // 'anyOf': [ + // { + // 'type': 'string', + // 'enum': ['tabSize'] + // }, + // { + // 'type': 'number', + // 'minimum': 1 + // } + // ], + // 'default': 'tabSize', + // 'markdownDescription': nls.localize('indentSize', "The number of spaces used for indentation or 'tabSize' to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.") + // }, 'editor.insertSpaces': { 'type': 'boolean', 'default': EDITOR_MODEL_DEFAULTS.insertSpaces, diff --git a/src/vs/editor/common/model.ts b/src/vs/editor/common/model.ts index aa4796c306c..a15dd004bef 100644 --- a/src/vs/editor/common/model.ts +++ b/src/vs/editor/common/model.ts @@ -362,7 +362,7 @@ export class TextModelResolvedOptions { trimAutoWhitespace: boolean; }) { this.tabSize = src.tabSize | 0; - this.indentSize = src.indentSize | 0; + this.indentSize = src.tabSize | 0; this.insertSpaces = Boolean(src.insertSpaces); this.defaultEOL = src.defaultEOL | 0; this.trimAutoWhitespace = Boolean(src.trimAutoWhitespace); diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index a00d67ec56b..b2ac03e4fcd 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -641,22 +641,13 @@ declare module 'vscode' { /** * The size in spaces a tab takes. This is used for two purposes: * - the rendering width of a tab character; - * - the number of spaces to insert when [insertSpaces](#TextEditorOptions.insertSpaces) is true - * and `indentSize` is set to `"tab"`. + * - the number of spaces to insert when [insertSpaces](#TextEditorOptions.insertSpaces) is true. * * When getting a text editor's options, this property will always be a number (resolved). * When setting a text editor's options, this property is optional and it can be a number or `"auto"`. */ tabSize?: number | string; - /** - * The number of spaces to insert when [insertSpaces](#TextEditorOptions.insertSpaces) is true. - * - * When getting a text editor's options, this property will always be a number (resolved). - * When setting a text editor's options, this property is optional and it can be a number or `"tabSize"`. - */ - indentSize?: number | string; - /** * When pressing Tab insert [n](#TextEditorOptions.tabSize) spaces. * When getting a text editor's options, this property will always be a boolean (resolved). diff --git a/src/vs/workbench/api/node/extHostTextEditor.ts b/src/vs/workbench/api/node/extHostTextEditor.ts index 67ddc6361cd..3cb2231f1b8 100644 --- a/src/vs/workbench/api/node/extHostTextEditor.ts +++ b/src/vs/workbench/api/node/extHostTextEditor.ts @@ -316,18 +316,18 @@ export class ExtHostTextEditorOptions implements vscode.TextEditorOptions { } } - if (typeof newOptions.indentSize !== 'undefined') { - let indentSize = this._validateIndentSize(newOptions.indentSize); - if (indentSize === 'tabSize') { - hasUpdate = true; - bulkConfigurationUpdate.indentSize = indentSize; - } else if (typeof indentSize === 'number' && this._indentSize !== indentSize) { - // reflect the new indentSize value immediately - this._indentSize = indentSize; - hasUpdate = true; - bulkConfigurationUpdate.indentSize = indentSize; - } - } + // if (typeof newOptions.indentSize !== 'undefined') { + // let indentSize = this._validateIndentSize(newOptions.indentSize); + // if (indentSize === 'tabSize') { + // hasUpdate = true; + // bulkConfigurationUpdate.indentSize = indentSize; + // } else if (typeof indentSize === 'number' && this._indentSize !== indentSize) { + // // reflect the new indentSize value immediately + // this._indentSize = indentSize; + // hasUpdate = true; + // bulkConfigurationUpdate.indentSize = indentSize; + // } + // } if (typeof newOptions.insertSpaces !== 'undefined') { let insertSpaces = this._validateInsertSpaces(newOptions.insertSpaces);