JupyterLab Code Formatter#
A JupyterLab plugin to facilitate invocation of code formatters.
Source Code: GitHub.
Demo#
Requirements#
Python 3.6+
JupyterLab >= 3.0.0
Any supported code formatters (you can also specify your own, see custom formatter).
Important
JupyterLab Code Formatter only provides an interface for invoking code formatters on Jupyter Server, and does not include any code formatter by default.
Quick Start#
Install the package
pip install jupyterlab-code-formatter
conda install -c conda-forge jupyterlab_code_formatter
poetry add jupyterlab-code-formatter
pipenv install jupyterlab-code-formatter
Install some supported formatters (isort+black are default for Python)
# NOTE: Install black and isort,
# JL code formatter is configured to invoke isort and black by default
pip install black isort
Restart JupyterLab
This plugin includes a server plugin, restart JupyterLab if you have followed the above steps while it’s running.
Configure plugin
To configure which/how formatters are invoked, see configuration.