Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

jelmerderonde/jupyter-lab-parinfer

Repository files navigation

Build Status

Jupyter Lab Parinfer

jupyter-lab-parinfer is a Jupyter Lab Parinfer extension to enable Parinfer (structural editing for Lisps) in Jupyter Code Cells.

It uses the excellent Parinfer to make writing s-expressions easier. Because Jupyter Code cells use CodeMirror by default, this extension simply adds the already written parinfer-codemirror plugin to the mix.

Installation

Use the Jupyter Lab labextension command:

jupyter labextension install jupyter-lab-parinfer

You can also use the Extension Manager to install jupyter-lab-parinfer.

Usage

The extension should work automatically if you are using a Notebook which has "clojure" set as the default language (as is the case with the IClojure Kernel). Right now there are no configuration options available and Parinfer is always set to Ident mode. This might change in the future (or with a pull request from you?).

Development

The actual extension (small as it is) is written in ClojureScript and compiles to Javascript using shadow-cljs. For development you will need the following prerequisites:

Run the following commands to start developing:

npm run dev

And in a new terminal (but still in the directory where this extension lives):

jupyter labextension link .
jupyter lab --watch

The extension will automatically compile every time you make a change to the code. Refresh your browser to see the results.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

GNU AGPLv3