microsoft / vscode-autopep8

Formatting support for python using autopep8.
https://marketplace.visualstudio.com/items?itemName=ms-python.autopep8
MIT License
20 stars 13 forks source link

Unclear instructions for configuring .vscode\settings.json #158

Closed 0gregory0 closed 1 year ago

0gregory0 commented 1 year ago

I find the following instructions unclear:

Once installed in Visual Studio Code, "autopep8" will be available as a formatter for python files. Please select "autopep8" (extension id:ms-python.autopep8) as the default formatter. You can do this either by using the context menu (right click on a open python file in the editor) and select "Format Document With...", or you can add the following to your settings:

"[python]": {
"editor.defaultFormatter": "ms-python.autopep8"
}

and change the following, if set:

  "python.formatting.provider": "none"

Specifically, I find the last part unclear as it raises an unanswered question: "Change it to what?" If the intention is to remove the line of code, then a better choice of words would be "and delete the following, if set" or "and remove the following, if set". Kindly clarify.

I also felt that this would be more of a discussion than an issue, but I think discussions aren't enabled yet for the Autopep8 repository.

karthiknadig commented 1 year ago

The intent is if the setting "python.formatting.provider" was set to some value like autopep8 (or black or yapf) then it should be changed to none

0gregory0 commented 1 year ago

I see.

The reason I raised the issue was that I was getting the following warning in VS Code and I didn't know how to go about it:

This setting will soon be deprecated. Please use the Autopep8 extension or the Black Formatter extension. Learn more here: https://aka.ms/AAlgvkb.

image

Your help will be greatly appreciated.

karthiknadig commented 1 year ago

You will need it until the setting is deprecated and removed.

0gregory0 commented 1 year ago

Noted with thanks.