src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.ts/getPriorityFromContribution
function getPriorityFromContribution(
	contribution: ICustomEditorsExtensionPoint,
	extension: IExtensionDescription,
): RegisteredEditorPriority {
	switch (contribution.priority) {
		case RegisteredEditorPriority.default:
		case RegisteredEditorPriority.option:
			return contribution.priority;

		case RegisteredEditorPriority.builtin:
			// Builtin is only valid for builtin extensions
			return extension.isBuiltin ? RegisteredEditorPriority.builtin : RegisteredEditorPriority.default;

		default:
			return RegisteredEditorPriority.default;
	}
}