jupyterlab_code_formatter
jupyterlab_code_formatter copied to clipboard
Jupyterlab Code Formatter Error on R kernel
Hello,
The Code Formatter can work on the default ipykernel (Python3), however, after I add another independent kernel (R 4.2.1), it returned error, even though I used the same format.
Is there anyway to solve it?
Thank you so much.
I was getting the following error when using Jupyterlab Code Formatter in an irkernel notebook:
Jupyterlab Code Formatter Error Unable to find default formatters to use, please file an issue on GitHub.
The plugin defaults for the default_formatter setting look like this:
"preferences": {
"default_formatter": {
"python": [
"isort",
"black"
],
"R": "formatR",
"rust": "rustfmt",
"c++11": "astyle"
}
},
I added the following to my user preferences and it seems to work. Basically change the "R" key to lowercase.
{
"preferences": {
"default_formatter": {
"r": "formatR",
},
}
Perhaps this broke with JupyterLab 4? I'm running JupyterLab 4.0.11, R 4.3.2, IRkernel 1.3.2
Thanks @onepunchdan, was wondering where the issue was coming from. Using R 4.4.1, jupyterlab 4.1.6, IRkernel 1.3.2 and had the same problem.