-
Notifications
You must be signed in to change notification settings - Fork 46
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
Notebook Format Cell//Notebook not working with ruff-lsp
#490
Comments
Do you see anything in the logs? Refer to the troubleshooting guide. There was a bug that's been fixed in #485, I'll bump the version of |
What do you mean by this? Like, using the |
Sorry, typo! I meant:
I updated the issue. So using the Rust based version is a workaround. I'll try the updated |
Sorry, I missed that bit. Logs:
|
@jamesvrt the new Although I don't see any error in the logs :( |
Also, I'd recommend to switch over to the Rust based server as it has the same functionalities (+ a few more) with no additional installation and high performance :) |
How do you get the VSCode extension to use the latest BTW, I'm content to use |
Ah right, sorry. I'd need to release a new VS Code extension as well. |
I've released a new extension version which should be available in a couple of minutes. |
Just to say I've been having similar issues as the people above. adding "ruff.nativeServer": "on" to my workspace's settings.json got ruff formatting my notebook cells again. However, I'm on the latest version of your extension, I'm also on ruff 0.6.4 everywhere else and in the documentation I think it says that it should default to the native server without explicit setting? |
@HenryDashwood can you share the VS Code settings and Ruff logs? I just tested with |
Appreciate your hard work with |
I think we don't support range formatting for Notebooks in |
"Format Notebook", "Format Cell" and "Format Range" don't work, but "Ruff: Format document" (only available through ctrl+shift+P) does work. I need more granular control than document formatting, so I'll stick with the native server. Thanks! You can set this to closed if this is expected behaviour, though it might be nice to mention it in the extension page or default to the native server. |
Oh, that's unexpected and could very well be a bug in |
ruff-lsp
ruff-lsp
Tried to replicate this evening and couldn't I'm afraid. But I guess that does mean it's working! |
Create
test.ipynb
, create a cell withPerform Format Select/Cell/Document/Notebook via ctrl+shift+P, the right click menu or the keyboard shortcuts.
No changes observed in the cell.
Ruff output:
Performing
ruff format test.ipynb
on the CLI works as expected.Including
"ruff.nativeServer": "on"
insettings.json
resolves the issue.pyproject.toml
andsettings.json
).No
ruff.toml
orpyproject.toml
settings.json
includes:ruff --version
).ruff 0.6.3
ruff vscode extension 2024.42.0
Ubuntu 22.04
VSCode 1.92.2
Python 3.10.11
The text was updated successfully, but these errors were encountered: