-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
This is mostly to track real impact of this.
In some cases (unclear what are the requirements here), even though the document is correct and there is a valid code cell, the extension displays an error notification: "Editor selection is not within a code cell that supports formatting."
quarto/apps/vscode/src/providers/format.ts
Lines 130 to 154 in b1a2cab
class FormatCellCommand implements Command { public readonly id = "quarto.formatCell"; constructor(private readonly engine_: MarkdownEngine) { } public async execute(): Promise<void> { const editor = window.activeTextEditor; const doc = editor?.document; if (doc && isQuartoDoc(doc)) { const edits = await formatActiveCell(editor, this.engine_); if (edits) { editor.edit((editBuilder) => { edits.forEach((edit) => { editBuilder.replace(edit.range, edit.newText); }); }); } else { window.showInformationMessage( "Editor selection is not within a code cell that supports formatting." ); } } else { window.showInformationMessage("Active editor is not a Quarto document"); } } }
Screen.Recording.2025-10-19.at.18.11.01.mov
Steps to reproduce
No response
Actual behavior
No response
Expected behavior
No response
Your environment
- VSCode 1.105.1
- Quarto extension 1.126.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working