Skip to content

Commit

Permalink
register cell executor for stata
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Jan 1, 2024
1 parent ce202c8 commit 5e0c7b5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apps/vscode/src/host/executors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ interface VSCodeCellExecutor extends CellExecutor {
executeSelection?: () => Promise<void>;
}

const pythonCellExecutor: VSCodeCellExecutor = {
language: "python",
const jupyterCellExecutor = (language: string) : VSCodeCellExecutor => ({
language,
requiredExtension: ["ms-toolsai.jupyter"],
requiredExtensionName: "Jupyter",
requiredVersion: "2021.8.0",
Expand All @@ -75,7 +75,11 @@ const pythonCellExecutor: VSCodeCellExecutor = {
await commands.executeCommand("jupyter.execSelectionInteractive", code);
}
},
};
})

const pythonCellExecutor = jupyterCellExecutor("python");

const stataCellExecutor = jupyterCellExecutor("stata");

const rCellExecutor: VSCodeCellExecutor = {
language: "r",
Expand Down Expand Up @@ -137,6 +141,7 @@ const shellCellExecutor = { ...bashCellExecutor, language: "shell" };

const kCellExecutors = [
pythonCellExecutor,
stataCellExecutor,
rCellExecutor,
juliaCellExecutor,
bashCellExecutor,
Expand Down

0 comments on commit 5e0c7b5

Please sign in to comment.