Disable the `source.organizeImports` implementation?

オープン
#28 コメント 1 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
145
フォーク
8
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python-rope/pylsp-rope のほかの issue

python-rope/pylsp-rope の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。