-
Notifications
You must be signed in to change notification settings - Fork 23
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
Feat formatting #25
Feat formatting #25
Conversation
a84e31a
to
74bd7c9
Compare
@jhossbach i think this is done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks nice, thanks alot! I added a few comments in my review, and here is some additional stuff to keep track:
- Add
format
option to theREADME.md
- Default for
format
? Maybe add"I"
as default and disable isort per default? (@ccordoba12 what is your opinion on pylsp-ruff disabling isort and using ruff's isort capabilities per default?)
i thought so too. up for discussion i guess. just adding it to the settings in
if we opt to disable |
74bd7c9
to
bdd50df
Compare
i just pushed changes containing the and also the import-formatting. |
Setting |
@jhossbach thanks for merging. |
I have a bit of cleanup that I want to do before creating a new release as well as #28. python-lsp-ruff/pylsp_ruff/plugin.py Lines 366 to 368 in 09518aa
should be fixable_codes = ["I"]
if settings.format:
fixable_codes = settings.format |
regarding isort: regarding release: |
Hello, I think the "isort" plugin for The author of the ruff command provides a language server called It was once added as a formatting feature, but has been reverted. |
@yaegassy we're providing fixes and the thought behind this PR is that the user can run fixing during formatting if they chose to do so. is that what you're asking about? |
@betaboon I have no particular opinion. |
Not necessarily disabling the import-sorting through ruff, but one issue I see is that someone that installed Regarding the ETA: I can wrap it up today, depending on how long it will take us to make formatting work out-of-the-box in a nice way, either way I want this to play nice before pushing a new release. |
i would actually find that behavior confusing.
|
... That sounds reasonable enough to me. To make it obvious how to always have import-sorting I will provide an additional example config in the README, but otherwise I am fine with that |
good call. |
Done :) |
resolves #24