Disable the `source.organizeImports` implementation?

Abierto
#28 1 comentario 4 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
145
Forks
8
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python-rope/pylsp-rope

Todos los issues de python-rope/pylsp-rope

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.