I'm trying to run Jupyterlab_code_formatter in a regular python file in Jupyter Lab. It is not formatted on save. I Can add a shortcut to manually run it:
{
"args": {},
"command": "jupyterlab_code_formatter:black",
"keys": [
"Ctrl K",
"Ctrl M"
],
"selector": ".jp-CodeMirrorEditor"
},
Can I add a shortcut to run both Isort and Black formatter? The following setting doesn't work:
{
"shortcuts": [
{
"command": "apputils:run-all-enabled",
"args": {
"commands": ["jupyterlab_code_formatter:black", "jupyterlab_code_formatter:isort"],
},
"keys": [
"Ctrl K",
"Ctrl M"
],
"selector": ".jp-CodeMirrorEditor"
}
]
}