Skip to content

Latest commit

 

History

History
76 lines (46 loc) · 1005 Bytes

README.md

File metadata and controls

76 lines (46 loc) · 1005 Bytes

mystnb.nvim

Detect language attached to myst-notebook's code cells in neovim.

Example

Without mystnb.nvim

With mystnb.nvim

Installation

With packer:

use({
    "sondalex/mystnb.nvim",
    config = function()
    require("mystnb").setup()
    end
})

Settings

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"]
)
```

Testing (Unix based only)

./tests/run