Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyterlab Code Formatter Error on R kernel #327

Open
ZhengJIN94 opened this issue Oct 8, 2023 · 1 comment
Open

Jupyterlab Code Formatter Error on R kernel #327

ZhengJIN94 opened this issue Oct 8, 2023 · 1 comment

Comments

@ZhengJIN94
Copy link

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.

@onepunchdan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants