ruff icon indicating copy to clipboard operation
ruff copied to clipboard

Official PyCharm Plugin

Open Pixel-Minions opened this issue 1 year ago • 8 comments

Hi,

I was wondering if there are any plans for creating plugins for Pycharm for the formatter and linter Ruff.

Most of the people I have ever worked use Pycharm as the main driver for dev and we find ourselves using the terminal within to use Ruff.

best,

Pixel-Minions avatar Feb 23 '24 17:02 Pixel-Minions

Hey.

PyCharm support is something that's on our minds and we agree that it's important. For now, you can give the unofficial pycharm plugin a try https://docs.astral.sh/ruff/integrations/#pycharm-unofficial

MichaReiser avatar Feb 23 '24 17:02 MichaReiser

Thank you for your insights, @MichaReiser. We've been utilizing the plugin you recommended, primarily due to the lack of alternatives. However, we've encountered some challenges with it. Specifically, the plugin doesn't seem to perform linting as effectively as needed. We've noticed that certain linting issues aren't identified during its use, leading to unexpected feedback from our CI/CD pipeline. To address this, we're considering the implementation of pre-commit hooks as a means to automate and enhance the linting process.

Pixel-Minions avatar Feb 23 '24 17:02 Pixel-Minions

@Pixel-Minions, have you tried creating an issue in https://github.com/koxudaxi/ruff-pycharm-plugin to see if your problem can get fixed or is there already an existing issue?

MichaReiser avatar Feb 24 '24 17:02 MichaReiser

PyCharm is one of the most used Python IDEs, specially in a professional setting. A lot of people at my company use PyCharm but find ourselves running ruff from the command line. I believe this should be taken as a priority. The unofficial plugin has linting bugs and sometimes work unexpectedly.

anmolratn-qure avatar Apr 10 '24 20:04 anmolratn-qure

@snowsignal plans to look into this once we've rewritten our LSP in rust.

MichaReiser avatar Apr 11 '24 06:04 MichaReiser

Now that rust based lsp server is beta, are there any updates on these plans?

raayu83 avatar May 24 '24 18:05 raayu83

We are continuing to consider the best path forward here and discussing with both the JetBrains team and the author of the existing plugin. We're very interested in providing a better experience in PyCharm and we'll definitely be dedicating resources to it. I think most of the remaining uncertainty is how to use our LSP to provide the same experience in both paid and free PyCharm versions.

zanieb avatar May 24 '24 19:05 zanieb

I think most of the remaining uncertainty is how to use our LSP to provide the same experience in both paid and free PyCharm versions.

There's LSP4IJ. Its support range is pretty good. One minor issue is that it is (also) unstable.

InSyncWithFoo avatar Jul 09 '24 03:07 InSyncWithFoo

Please consider prioritizing this.

The plugin maintained by @koxudaxi routinely get's confused about what version of ruff it should be using in a given project and most recently has started just erroring all the time and trying to use a version of ruff from a project that's not even open.

This is creating a horrible development experience and there's many of us that have over a decade of experience with Pycharm and moving to VSCode is a huge ask.

Kaelten avatar Aug 20 '24 20:08 Kaelten

@InSyncWithFoo @Kaelten Thank you for your feedback. I want to provide an update on our progress.

Currently, I'm focusing on LSP4IJ compatibility, which we're working on in this PR: https://github.com/koxudaxi/ruff-pycharm-plugin/pull/437

By implementing LSP support, I aim to provide a PyCharm experience equivalent to VS Code. I expect to release it by the end of this week.

koxudaxi avatar Aug 21 '24 18:08 koxudaxi

@InSyncWithFoo @Kaelten Thank you for your feedback. I want to provide an update on our progress.

Currently, I'm focusing on LSP4IJ compatibility, which we're working on in this PR: koxudaxi/ruff-pycharm-plugin#437

By implementing LSP support, I aim to provide a PyCharm experience equivalent to VS Code. I expect to release it by the end of this week.

It's good to see movement, but I opened a bug report months ago about how the plugin continuously switches which install of ruff is in use and always swaps this globally across all instances of the IDE. This leads to the wrong version and/or the wrong configuration being used and it's a bit of a nightmare. It's been going on 7 months and there's been zero action against a pretty significant issue.

Kaelten avatar Aug 21 '24 23:08 Kaelten

@Kaelten Sorry for not responding. Some kind people have added their comments, which I hope will help to resolve the issue. I will pick up after the LSP response.

koxudaxi avatar Aug 22 '24 00:08 koxudaxi

@koxudaxi Thank you for chiming in! Please feel free to ping me about any questions that you might have about the VS Code extension / language server either here or on Discord. I'm more than happy to help in whatever way I can.

dhruvmanila avatar Aug 22 '24 02:08 dhruvmanila

Hi! I really appreciate all the work being done on Ruff. I was wondering if there has been any progress on PyCharm support. Thanks!

PinkOatmeal avatar Feb 05 '25 10:02 PinkOatmeal

Adding my voice of support for this. This week I decided to try PyCharm with ruff but I wasn't able to get it working out of the box using the unofficial plugin (probably related to https://github.com/koxudaxi/ruff-pycharm-plugin/issues/531) . In VSCode, the ruff integration is great and offers features such as formatting the selected lines rather than the full file which I find very useful in my current work. Official PyCharm support would be great. Now I'm left considering switching back to Black so I can use PyCharm.

olofahlen avatar Feb 21 '25 08:02 olofahlen