feat: select the folding provider to use (#157434)

* feat: support extension id in property `editor.foldingStrategy`

* work in progress

* use new setting 'editor.defaultFoldingRangeProvider' defined in workspace

* revert editorOptions changes

Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
This commit is contained in:
Baptiste Augrain
2022-10-23 15:45:34 +02:00
committed by GitHub
parent 66953830a2
commit 6e76e0e1b7
6 changed files with 116 additions and 7 deletions

View File

@@ -2358,7 +2358,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
const eventHandle = typeof provider.onDidChangeFoldingRanges === 'function' ? this._nextHandle() : undefined;
this._adapter.set(handle, new AdapterData(new FoldingProviderAdapter(this._documents, provider), extension));
this._proxy.$registerFoldingRangeProvider(handle, this._transformDocumentSelector(selector), eventHandle);
this._proxy.$registerFoldingRangeProvider(handle, this._transformDocumentSelector(selector), extension.identifier, eventHandle);
let result = this._createDisposable(handle);
if (eventHandle !== undefined) {