microsoft / vscode-black-formatter

Formatting support for Python using the Black formatter
https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
MIT License
150 stars 35 forks source link

configuration gray out and does not #394

Closed misogihagi closed 9 months ago

misogihagi commented 10 months ago

settings are grayed out and not reflected

Here is my workspace settings.json:

vscode

cwd and workspace are grayed out and not reflected.

actual settings are below:

Settings used to run Server:
[
    {
        "cwd": "c:\\Users\\user\\project",
        "workspace": "file:///c%3A/Users/project/python",
        "args": [
            "--config=/pyproject.toml"
        ],
        "path": [
            "${interpreter}",
            "-m",
            "black"
        ],
        "interpreter": [
            "python.exe"
        ],
        "importStrategy": "fromEnvironment",
        "showNotifications": "off"
    }
]
karthiknadig commented 9 months ago

@misogihagi Please install the latest version of Black formatter extension. This makes it seem like you have an older version were we did not have cwd.

Also, note black-formatter.workspace is not a supported setting. You can see here for the supported settings: https://github.com/microsoft/vscode-black-formatter#settings

misogihagi commented 9 months ago

Thanks! it works!