diff --git a/vscode/src/notebook.ts b/vscode/src/notebook.ts index 065bddf1ea..2d370b0be9 100644 --- a/vscode/src/notebook.ts +++ b/vscode/src/notebook.ts @@ -11,6 +11,7 @@ import { notebookTemplate } from "./notebookTemplate.js"; const qsharpCellMagic = "%%qsharp"; const jupyterNotebookType = "jupyter-notebook"; const qsharpConfigMimeType = "application/x.qsharp-config"; +let defaultLanguageId: string | undefined; /** * Sets up handlers to detect Q# code cells in Jupyter notebooks and set the language to Q#. @@ -53,8 +54,6 @@ export function registerQSharpNotebookHandlers() { }), ); - let defaultLanguageId: string | undefined; - function updateQSharpCellLanguages(cells: vscode.NotebookCell[]) { for (const cell of cells) { // If this is a code cell that starts with %%qsharp, and language wasn't already set to Q#, set it.