vscode-ruff
vscode-ruff copied to clipboard
Ruff extension depends on `ms-python.python` breaking non-Pylance LSPs
Hi!
At Stripe we use Ruff to check our code (very happy with the speed, UX, and lints available). However, we also rely on a different LSP to type-check the code properly at scale. That LSP is incompatible with Pylance, and as such, Pylance needs to be disabled.
Since the Ruff extension depends on ms-python.python, and it in turn automatically installs and enables Pylance, our engineers are forced to manually intervene to disable Pylance whenever the Ruff extension gets re-installed / updated. Currently, there's no way to configure banned extensions in VSCode, so we have tooling to instead remove the extensions when we push an update. However, sometimes Ruff gets updated out of band.
Could we remove the reliance on ms-python.python in the Ruff extension?
Thanks for the kind words!
This is related to https://github.com/astral-sh/ruff-vscode/issues/479
Is it possible to use the "python.languageServer": "None" setting? This will at least disable any language server from running via the Python extension.
It seems that other LSPs like Pyright check if Pylance is enabled and if so turns itself off. I can file an issue there as well, but ultimately, we might need to remove the reliance on the Python extension altogether so while helpful, I think the core issue is still relevant! ☺️