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.
Use the Jupyter Lab labextension command:
jupyter labextension install jupyter-lab-parinfer
You can also use the Extension Manager to install jupyter-lab-parinfer.
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?).
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.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.