Skip to content
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

Disable the source.organizeImports implementation? #28

Open
mattiasb opened this issue Aug 29, 2024 · 1 comment
Open

Disable the source.organizeImports implementation? #28

mattiasb opened this issue Aug 29, 2024 · 1 comment

Comments

@mattiasb
Copy link

mattiasb commented Aug 29, 2024

  • pylsp-rope version: 0.1.16
  • Text editor/IDE/LSP Client: Emacs / EGlot
  • Python version: 3.12.4
  • Operating System: Fedora Workstation 40

Description

I'm trying to (automatically) sort my imports on
save using python-lsp-ruff but the organize imports
of pylsp-rope makes me have to manually choose between
using ruff and rope for sorting.

Details

I've enabled pylsp-rope for its refactoring abilities.

I see that it also exports an implementation of
source.organizeImports but I'm also using
python-lsp-ruff 2.2.0 and would prefer to use its
builtin import sorting.

What my editor gives me is the possibility to manually
choose between the ruff version and the pylsp-rope
version when source.organizeImports gets invoked.

It would be neat if it was possible to disable the
source.organizeImports implementation for pylsp-rope
so I didn't have to do this manually. Would it be possible
to export such a knob in the configuration? :)

@fast-90
Copy link

fast-90 commented Sep 28, 2024

+1 for this, for the same reasons and with the same setup as OP :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants