Replies: 3 comments 2 replies
-
After some experimentation on my end, I'm pretty sure we cannot currently use the black extension, as is, to run If the black extension is installed, it becomes the default formatter, but will use the python.formatting.blackPath as configured. However, it fails to format, as it does a version check at startup, and the darker version ( If you try to explicitly configure the black extension to use the darker path through the black extension config: "black-formatter.path": "<install_location_from_step_2>", then the black extension fails to load at startup |
Beta Was this translation helpful? Give feedback.
-
As a workaround, it is possible to use "Run on Save" or "emeraldwalk" extension from the VSCode Marketplace to automatically trigger darker. Steps:
|
Beta Was this translation helpful? Give feedback.
-
Thanks @falkben, @kedhammar and @Ashblaze for your report and analysis. I'm trying to form a picture of the current status with regard to interoperability between Darker and VSCode. Any updates to the situation since August 2023? |
Beta Was this translation helpful? Give feedback.
-
Some teammates are reporting that darker is no longer functioning as a formatting provider inside vscode.
The options suggested in the readme are currently deprecated:
It seems that the vscode Python extension is moving most of it's previously included integrations (like black formatting provider) into separate extensions. They have documentation on this transition here: https://github.com/microsoft/vscode-python/wiki/Migration-to-Python-Tools-Extensions
I am wondering if a new
darker
extension will be needed or if darker could possible tag along and run inside the black extension, similar to how it's been running as the black formatting provider. I noticed that there is a GH issue for this, but unsure whether it will actually be needed: #424 Would you need help with this?In the meantime, should the README be updated to include some information about the feasibility of running inside vscode during this transition period?
Beta Was this translation helpful? Give feedback.
All reactions