Change:
Related: Looking into reports of X formatter being used instead of Y in various flows. Looking at both on save and on execution formatting participants, one common point is that when is specifically being used, the intended formatter is applied as expected. Some early digging is pointing to a use of instead of , so will be working out a fix there. Will update this thread as is relevant.
do you have some minimal verif steps?
Verification Steps: Install Black Formatter + Ruff Create with only the following:create notebook with a single code cell, and contents In Stable () Save Notebook Black formatter runs =nothing changes Ruff formatter runs =Single quotations turned to double quotations () In Insiders () Save Notebook ONLY Black formatter runs =nothing changes

Discussion:
return undefined; } <ins> export async function getDocumentFormattingEditsWithSelectedProvider( workerService: IEditorWorkerService, languageFeaturesService: ILanguageFeaturesService, editorOrModel: ITextModel | IActiveCodeEditor, mode: FormattingMode, token: CancellationToken, ): Promise<TextEdit[] | undefined> { const model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel; const provider = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model); const selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.File); if (selected) { const rawEdits = await Promise.resolve(selected.provideDocumentFormattingEdits(model, model.getOptions(), token)).catch(onUnexpectedExternalError); return await workerService.computeMoreMinimalEdits(model.uri, rawEdits); } return undefined; } </ins> export function getOnTypeFormattingEdits( workerService: IEditorWorkerService, languageFeaturesService: ILanguageFeaturesService,

import { IEditorWorkerService } from 'vs/editor/common/services/editorWorker'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; <del> import { FormattingMode, formatDocumentWithSelectedProvider, getDocumentFormattingEditsUntilResult } from 'vs/editor/contrib/format/browser/format'; </del> <ins> import { FormattingMode, formatDocumentWithSelectedProvider, getDocumentFormattingEditsWithSelectedProvider } from 'vs/editor/contrib/format/browser/format'; </ins> import { Action2, MenuId, registerAction2 } from 'vs/platform/actions/common/actions'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';

const model = ref.object.textEditorModel; <del> const formatEdits = await getDocumentFormattingEditsUntilResult( </del> <ins> const formatEdits = await getDocumentFormattingEditsWithSelectedProvider( </ins> editorWorkerService, languageFeaturesService, model, <del> model.getOptions(), </del> <ins> FormattingMode.Explicit, </ins> CancellationToken.None );

const model = ref.object.textEditorModel; <del> // todo: eventually support cancellation. potential leak if cell deleted mid execution const formatEdits = await getDocumentFormattingEditsUntilResult( </del> <ins> const formatEdits = await getDocumentFormattingEditsWithSelectedProvider( </ins> this.editorWorkerService, this.languageFeaturesService, model, <del> model.getOptions(), </del> <ins> FormattingMode.Silent, </ins> CancellationToken.None );

import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ApplyCodeActionReason, applyCodeAction, getCodeActions } from 'vs/editor/contrib/codeAction/browser/codeAction'; import { CodeActionKind, CodeActionTriggerSource } from 'vs/editor/contrib/codeAction/common/types'; <del> import { getDocumentFormattingEditsUntilResult } from 'vs/editor/contrib/format/browser/format'; </del> <ins> import { FormattingMode, getDocumentFormattingEditsWithSelectedProvider } from 'vs/editor/contrib/format/browser/format'; </ins> import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { localize } from 'vs/nls'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';

const model = ref.object.textEditorModel; <del> const formatEdits = await getDocumentFormattingEditsUntilResult( </del> <ins> const formatEdits = await getDocumentFormattingEditsWithSelectedProvider( </ins> this.editorWorkerService, this.languageFeaturesService, model, <del> model.getOptions(), </del> <ins> FormattingMode.Silent, </ins> token );