Detect language attached to myst-notebook's code cells in neovim.
Without mystnb.nvim
With mystnb.nvim
With packer:
use({
"sondalex/mystnb.nvim",
config = function()
require("mystnb").setup()
end
})
Default settings
{
lookup = { ipython3 = "python", ipython = "python" }
}
Lookup associates a specific keyword to a treesitter language.
Example:
This cell is associated to python
```{code-cell} python
import math
```
mystnb also detects language if you provide a file extension. Example:
```{code-cell} py
import math
```
```{code-cell} jl
using DataFrame
DataFrame(
"product identifier" => [15, 20, 25],
"product name" => ["Apple", "Pear", "Peach"]
)
```
./tests/run