Skip to content

Commit

Permalink
code-runner support
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehvix committed Dec 12, 2022
1 parent ec6cc48 commit bda5b0a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,22 @@ function activate(context) {
if (files) {
fp = files[0].fsPath;
CONFIG.update('executable', fp);
// console.log(`Saved executable path: ${fp}`);

if (vscode.extensions.getExtension('formulahendry.code-runner')) {
let CR_CONF = vscode.workspace.getConfiguration('code-runner');
if (CR_CONF === undefined) {
vscode.workspace.getConfiguration().update('code-runner.executorMap', {});
}

map = CR_CONF.inspect('executorMap').workspaceFolderValue;
if (map === undefined) {
CR_CONF.update('executorMap', { 'nome': fp });
} else {
map['nome'] = fp;
CR_CONF.update('executorMap', map);
}
}
console.log(`Saved executable path: ${fp}`);
}
});
});
Expand Down

0 comments on commit bda5b0a

Please sign in to comment.