microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.3k stars 293 forks source link

`jupyter.hascodecells` should also support other languages. #14018

Closed uduse closed 1 year ago

uduse commented 1 year ago

I have evcxr installed and I can run Rust REPL in an interactive Jupyter panel inside of vscode.

Expected behaviour

By defining jupyter.interactiveWindow.cellMarker.codeRegex correctly, I expect jupyter also captures code blocks in Rust files (*.rs) and can use the same keys to send blocks of code to the interactive window.

Actual behaviour

It doesn't work. Nothing shows up in the interactive window when I press the right shortcut key.

Diagnosis

The jupyter.hascodecells context isn't triggered properly. I think this is because the extension only works in a Python language mode. Reasons: (1) if I rename the file to "*.py" extension doesn't work. (2) changing langauge mode works.

Solution

Support arbitrary language modes through some extension config.

DonJayamanne commented 1 year ago

I believe the root cause is https://github.com/microsoft/vscode-jupyter/issues/273

amunger commented 1 year ago

closing as duplicate