-
Notifications
You must be signed in to change notification settings - Fork 53
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
Faulted to apply Ruff formatting to the document #300
Comments
Hi! Can you please attach the contents of the file for us to test with? |
System info:
Ruff v2023.40.0 |
I tried various files in that repo, for instance: |
Perhaps the unicode symbols bother |
Hm |
Doesn't the vscode extension ship with a version of ruff?
|
It does, but I wasn't sure what version yours shipped with — we will use your system version if available. If it's the latest version though, then I'm pretty confused by this error. The given file also formats fine for me in VSCode. Can you open the logs for the Ruff extension? |
Well, I don't have a locally installed version on my system. How do I open the logs? |
|
Do you have |
Nope, I only have:
|
The formatter is in alpha -- you need to opt into it for now: https://github.com/astral-sh/ruff/blob/main/crates/ruff_python_formatter/README.md#vs-code. Though I'll fix this specific error in the next release to avoid confusion. |
## Summary We always expose this on the client side, so doing so conditionally within the server can lead to invalid command errors. This action has to be triggered explicitly by the user, so it seems fine to expose it even if Ruff doesn't register itself as a formatter. Closes astral-sh/ruff-vscode#300.
Thanks, I confirm that setting
fixed my issue. |
## Summary We always expose this on the client side, so doing so conditionally within the server can lead to invalid command errors. This action has to be triggered explicitly by the user, so it seems fine to expose it even if Ruff doesn't register itself as a formatter. Closes astral-sh/ruff-vscode#300.
The text was updated successfully, but these errors were encountered: