Detailed Installation Guide#

Python#

  1. 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
  1. Install some supported formatters

Install any desired formatter from the below list

# NOTE: You don't have to install all of them if you don't want to.
pip install black
pip install yapf
pip install isort
pip install autopep8
# NOTE: You don't have to install all of them if you don't want to.
conda install -c conda-forge black
conda install -c conda-forge yapf
conda install -c conda-forge isort
conda install -c conda-forge autopep8
# NOTE: You don't have to install all of them if you don't want to.
poetry add black
poetry add yapf
poetry add isort
poetry add autopep8
# NOTE: You don't have to install all of them if you don't want to.
pipenv install black
pipenv install yapf
pipenv install isort
pipenv install autopep8
  1. Restart JupyterLab

This plugin includes a server plugin, restart JupyterLab if you have followed the above steps while it’s running.

  1. Configure plugin

To configure which/how formatters are invoked, see configuration.

R#

  1. Install Python -> R Bridge

pip install rpy2
conda install -c conda-forge rpy2
poetry add rpy2
pipenv install jupyterlab-code-formatter
  1. 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
  1. Install some supported formatters Install any desired formatter from the below list.

# NOTE: You don't have to install all of them if you don't want to.
R --vanilla -e 'install.packages("formatR", repos = "http://cran.us.r-project.org")'
R --vanilla -e 'install.packages("styler", repos = "http://cran.us.r-project.org")'
  1. Restart JupyterLab

This plugin includes a server plugin, restart JupyterLab if you have followed the above steps while it’s running.

  1. Configure plugin

To configure which/how formatters are invoked, see configuration.