question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Syntax highlighting for non-python kernels in code-cell directive

See original GitHub issue

Consider the following .md file

---
jupytext:
  formats: md:myst
  text_representation:
    extension: .md
    format_name: myst
    format_version: '0.8'
    jupytext_version: 1.4.1+dev
kernelspec:
  display_name: Coconut
  language: coconut
  name: coconut
---

```{code-cell} coconut
range(10) |> map$(pow$(?, 2)) |> list
```

Changing the kernel to coconut works, as can be seen in the rendered image below.

image

But the syntax highlighting does not. Is it possible to somehow define a syntax file for different kernels?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
chrisjsewellcommented, Aug 18, 2020

Yep I should be able to sort that this week 🤞

1reaction
chrisjsewellcommented, Sep 1, 2020

This should be closed in v0.8.0 😄, but feel free to re-open/open another issue if anything is outstanding: https://jupyterbook.org/reference/_changelog.html#v0-8-0-2020-09-01

Read more comments on GitHub >

github_iconTop Results From Across the Web

ipython notebook - Non-Python language syntax highlighting?
I'm running Jupyter 4 (4.2.0, to be exact), and putting the following code in ~/.jupyter/custom/custom.js works very well for me.
Read more >
Jupyter Notebook 6.5.2 documentation - Read the Docs
A code cell allows you to edit and write new code, with full syntax highlighting and tab completion. The programming language you use...
Read more >
No syntax highlighting in the new vscode Jupyter notebook ...
Upon launching the notebook, there is syntax highlighting (I am guessing default syntax highlighting for Python).
Read more >
PyCharm - Run and debug Jupyter notebook code cells
You can execute the code of the notebook cells in many ways using the ... commands of the code cell context menu (right-click...
Read more >
MyST Cheat Sheet — Statistics and Data Science
Figures and Images¶. Note. Content is not permitted in image directive. ... ```{code-cell} ipython3 note = "Python syntax highlighting" print(note) ```
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found