Skip to content

Latest commit

 

History

History
160 lines (125 loc) · 2.93 KB

installation.md

File metadata and controls

160 lines (125 loc) · 2.93 KB

Detailed Installation Guide

Python

  1. Install the package
```bash
pip install jupyterlab-code-formatter
```
```bash
conda install -c conda-forge jupyterlab_code_formatter
```
```bash
poetry add jupyterlab-code-formatter
```
```bash
pipenv install jupyterlab-code-formatter
```
  1. Install some supported formatters

Install any desired formatter from the below list

```bash
# 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
```
```bash
# 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
```
```bash
# 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
```
```bash
# 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
```bash
pip install rpy2
```
```bash
conda install -c conda-forge rpy2
```
```bash
poetry add rpy2
```
```bash
pipenv install jupyterlab-code-formatter
```
  1. Install the package
```bash
pip install jupyterlab-code-formatter
```
```bash
conda install -c conda-forge jupyterlab_code_formatter
```
```bash
poetry add jupyterlab-code-formatter
```
```bash
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.