jupytext.nvim
jupytext.nvim copied to clipboard
Convert Jupyter Notebooks with R code cells to ```r code cells
Hi,
Fantastic plugin!
I am running Jupyter Notebooks with an R Kernel and when converting these files to Markdow the code cells are converted to code blocks starting with ```R. However many other plugins such as quarto.nvim and otter.nvim expect code blocks to start with ```r for e.g. syntax highlighting.
Is there a setting that I can make to ensure that these cells are converted to code blocks starting with ```r?
For reference, here is the metadata from an example notebook:
---
jupyter:
jupytext:
text_representation:
extension: .md
format_name: markdown
format_version: '1.3'
jupytext_version: 1.16.1
kernelspec:
display_name: R 4.2
language: R
name: ir42
---
And my lazy.nvim config:
{
"GCBallesteros/jupytext.nvim",
config = function()
require("jupytext").setup({
style = "markdown",
output_extension = "md",
force_ft = "markdown",
})
end,
}
Thanks a lot for your time and help!
Hi @ClemensKohl I'm afraid this is out of the control of jupytext.nvim. I don't know if jupytext has support for this.
Either the nvim plugins you cite or jupytext are the ones that would have to change to deal more gracefully with such a situation.
If it ends up being that jupytext has some flag to control this we could look for a way to pass in the additional parameters required.
I asked the same question on the jupytext github and will report back if there is a solution!