diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index 91dace927d8612ea95073c968607f51459895f9b..60fd454b086644d88998a2751393057b78f08677 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts @@ -237,7 +237,22 @@ export class NotebookContribution extends Disposable implements IWorkbenchContri const associatedEditors = distinct([ ...this.getUserAssociatedNotebookEditors(resource), ...this.getContributedEditors(resource) - ], editor => editor.id); + ], editor => editor.id).sort((a, b) => { + // if a content provider is exclusive, it has higher order + if (a.exclusive && b.exclusive) { + return 0; + } + + if (a.exclusive) { + return -1; + } + + if (b.exclusive) { + return 1; + } + + return 0; + }); return associatedEditors.map(info => { return {