diff --git a/extensions/clojure/language-configuration.json b/extensions/clojure/language-configuration.json index b68c24d92e3..24f52480015 100644 --- a/extensions/clojure/language-configuration.json +++ b/extensions/clojure/language-configuration.json @@ -20,8 +20,6 @@ ["\"", "\""] ], "folding": { - "indendationBasedFolding": { - "offSide": true - } + "offSide": true } } \ No newline at end of file diff --git a/extensions/coffeescript/language-configuration.json b/extensions/coffeescript/language-configuration.json index be41b444061..8c7fbd458df 100644 --- a/extensions/coffeescript/language-configuration.json +++ b/extensions/coffeescript/language-configuration.json @@ -23,8 +23,6 @@ ["'", "'"] ], "folding": { - "indendationBasedFolding": { - "offSide": true - } + "offSide": true } } \ No newline at end of file diff --git a/extensions/fsharp/language-configuration.json b/extensions/fsharp/language-configuration.json index 8a88df12433..effac7e3835 100644 --- a/extensions/fsharp/language-configuration.json +++ b/extensions/fsharp/language-configuration.json @@ -22,8 +22,6 @@ ["'", "'"] ], "folding": { - "indendationBasedFolding": { - "offSide": true - } + "offSide": true } } diff --git a/extensions/markdown/language-configuration.json b/extensions/markdown/language-configuration.json index c328f05d0e0..6fa9139b76f 100644 --- a/extensions/markdown/language-configuration.json +++ b/extensions/markdown/language-configuration.json @@ -39,8 +39,6 @@ ["`", "`"] ], "folding": { - "indendationBasedFolding": { - "offSide": true - } + "offSide": true } } \ No newline at end of file diff --git a/extensions/pug/language-configuration.json b/extensions/pug/language-configuration.json index 96f950546e6..00f4885d46e 100644 --- a/extensions/pug/language-configuration.json +++ b/extensions/pug/language-configuration.json @@ -22,8 +22,6 @@ ["\"", "\""] ], "folding": { - "indendationBasedFolding": { - "offSide": true - } + "offSide": true } } \ No newline at end of file diff --git a/extensions/python/language-configuration.json b/extensions/python/language-configuration.json index 7d9f13e6ce5..97feb4d8aca 100644 --- a/extensions/python/language-configuration.json +++ b/extensions/python/language-configuration.json @@ -23,8 +23,6 @@ ["'", "'"] ], "folding": { - "indendationBasedFolding": { - "offSide": true - } + "offSide": true } } \ No newline at end of file diff --git a/extensions/yaml/language-configuration.json b/extensions/yaml/language-configuration.json index 3d122eed6e0..cc1aa26cde6 100644 --- a/extensions/yaml/language-configuration.json +++ b/extensions/yaml/language-configuration.json @@ -22,8 +22,6 @@ ["'", "'"] ], "folding": { - "indendationBasedFolding": { - "offSide": true - } + "offSide": true } } \ No newline at end of file diff --git a/src/vs/editor/common/model/textModelWithTokens.ts b/src/vs/editor/common/model/textModelWithTokens.ts index 14c19d4a080..58a4414920e 100644 --- a/src/vs/editor/common/model/textModelWithTokens.ts +++ b/src/vs/editor/common/model/textModelWithTokens.ts @@ -844,8 +844,7 @@ export class TextModelWithTokens extends TextModel implements editorCommon.IToke private _getIndentRanges(): IndentRange[] { if (!this._indentRanges) { let foldingRules = LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id); - let offSide = foldingRules && foldingRules.indendationBasedFolding && foldingRules.indendationBasedFolding.offSide; - this._indentRanges = computeRanges(this, offSide); + let offSide = foldingRules && foldingRules.offSide; } return this._indentRanges; } diff --git a/src/vs/editor/common/modes/languageConfiguration.ts b/src/vs/editor/common/modes/languageConfiguration.ts index ad764283935..093db6b102a 100644 --- a/src/vs/editor/common/modes/languageConfiguration.ts +++ b/src/vs/editor/common/modes/languageConfiguration.ts @@ -102,18 +102,15 @@ export interface IndentationRule { * Describes folding rules for a language. */ export interface FoldingRules { - indendationBasedFolding?: { - /** - * Used by the indentation based strategy to decide wheter empty lines belong to the previous or the next block. - * A language adheres to the off-side rule if blocks in that language are expressed by their indentation. - * See [wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) for more information. - * If not set, `false` is used and empty lines belong to the previous block. - */ - offSide: boolean; - }; + /** + * Used by the indentation based strategy to decide wheter empty lines belong to the previous or the next block. + * A language adheres to the off-side rule if blocks in that language are expressed by their indentation. + * See [wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) for more information. + * If not set, `false` is used and empty lines belong to the previous block. + */ + offSide?: boolean; } - /** * Describes a rule to be evaluated when pressing Enter. */ diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index d490e9c987e..bff19722704 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -4365,15 +4365,13 @@ declare module monaco.languages { * Describes folding rules for a language. */ export interface FoldingRules { - indendationBasedFolding?: { - /** - * Used by the indentation based strategy to decide wheter empty lines belong to the previous or the next block. - * A language adheres to the off-side rule if blocks in that language are expressed by their indentation. - * See [wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) for more information. - * If not set, `false` is used and empty lines belong to the previous block. - */ - offSide: boolean; - }; + /** + * Used by the indentation based strategy to decide wheter empty lines belong to the previous or the next block. + * A language adheres to the off-side rule if blocks in that language are expressed by their indentation. + * See [wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) for more information. + * If not set, `false` is used and empty lines belong to the previous block. + */ + offSide?: boolean; } /** diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts b/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts index b97d7b652e3..d6532f578bd 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/languageConfiguration/languageConfigurationExtensionPoint.ts @@ -387,15 +387,9 @@ const schema: IJSONSchema = { type: 'object', description: nls.localize('schema.folding', 'The language\'s folding settings.'), properties: { - indendationBasedFolding: { - type: 'object', - description: nls.localize('schema.folding.indendationBasedFolding', 'Settings for indentation based folding.'), - properties: { - offSide: { - type: 'boolean', - description: nls.localize('schema.folding.indendationBasedFolding.offSide', 'A language adheres to the off-side rule if blocks in that language are expressed by their indentation. If set, empty lines belong to the subsequent block.'), - } - } + offSide: { + type: 'boolean', + description: nls.localize('schema.folding.offSide', 'A language adheres to the off-side rule if blocks in that language are expressed by their indentation. If set, empty lines belong to the subsequent block.'), } } }