Disable the `source.organizeImports` implementation?

Đang mở
#28 1 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python

Hướng nghiên cứu

Start by locating where pylsp-rope registers its source.organizeImports implementation and how the project exposes configuration options. Check the existing tests for that capability and add a case for disabling it through configuration. Done means the option is documented and a test confirms the handler is unavailable when disabled; the issue does not name specific files or tests.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

  • 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? :)

Ngôn ngữ chính
Python
Star
145
Fork
8
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python-rope/pylsp-rope

Tất cả issue của python-rope/pylsp-rope

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.