I have a Jupyter notebook in Visual Studio Code where I use custom magics to run cells in different languages through the Python interpreter. For SQL with DuckDB, I start the cell with %%duck_magic
and select "SQL" in the cell language dropdown in the bottom right. However, for my YAML magic (%%yaml_magic
), "YAML" doesn’t appear as an option in the dropdown.
Environment Details:
- VS Code version: 1.92.0
- Jupyter extension (Microsoft) version: v2023.11.1100101639
- YAML extension (Red Hat) version: v1.15.0
- Python version: 3.10.11
Steps to Reproduce:
- Create a new Jupyter notebook in VS Code.
- Add a cell with
%%yaml_magic
(or just an empty cell).
- Click the select cell language mode dropdown in the bottom right.
- Observe that "YAML" is missing from the list, while "SQL" and several other common languages other than python are available.
What I’ve Already Tried:
Question:
Is there a way to enable YAML as a selectable language in the Jupyter notebook cell language dropdown in VS Code? Ideally, I'd like to associate YAML syntax highlighting with my custom %yaml_magic
cells without workarounds like repurposing other languages.