Skip to content

Commit

Permalink
more filetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
marius311 committed Nov 12, 2024
1 parent df89a0e commit 31de5f0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,18 @@ export async function activate(context: vscode.ExtensionContext) {
export function deactivate() { }


const EXTENSION_FORMATS = [
'.ipynb', '.md', '.markdown', '.Rmd', '.py', '.coco', '.R', '.r', '.jl',
'.cpp', '.ss', '.clj', '.scm', '.sh', '.ps1', '.q', '.m', '.wolfram',
'.pro', '.js', '.ts', '.scala', '.rs', '.robot', '.resource', '.cs',
'.fsx', '.fs', '.sos', '.java', '.groovy', '.sage', '.ml', '.hs', '.tcl',
'.mac', '.gp', '.do', '.sas', '.xsh', '.lua', '.go', '.qmd', '.myst',
'.mystnb', '.mnb', '.auto'
];

function _isPossibleNotebookFile(fileName: string): boolean {
return /\.(ipynb|jl|py)$/.test(fileName);
const ext = path.extname(fileName);
return EXTENSION_FORMATS.includes(ext);
}

async function _runSync(fileName: string) {
Expand Down

0 comments on commit 31de5f0

Please sign in to comment.