Mechanism for passing arbitrary extra config to formatters
- Lenguaje dominante
- Vim Script
- Estrellas
- 1.1k
- Forks
- 102
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Lots of formatters have extra config users may want to pass, and creating a top-level flag for each one will get cumbersome. We should consider a generic mechanism for passing flags through to formatters.
Factors to consider:
- These should be attached to the fine-grained formatter name, not the language, because we don't want to accidentally pass them to a different formatter that doesn't support them when the user switches formatter.
- Some might conflict with default flags. For instance, a user might want to pass `--type` to js-beautify and find that it conflicts with the `--type` flag we already pass by default.
- Most config would be per-path rather than global preferences. For instance, a user will want to configure an `--aosp` flag when working on Android Java, but then be surprised if it's applied to other Java code they're working on later.
- If possible, these config options should live in some project-local config file like `.clang-format` or `.editorconfig`, not something codefmt-specific, and codefmt should just try to be smart about detecting and not conflicting with such config where appropriate.
Guía de contribución
Línea de trabajo
El issue menciona .clang-format y .editorconfig como posibles fuentes de configuración locales del proyecto y cita --type y --aosp de js-beautify como ejemplos. Primero, determina cómo se seleccionan actualmente las opciones específicas del formatter; se considera terminado cuando exista un mecanismo decidido por formatter y por ruta que evite defaults conflictivos y una propagación no deseada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- vim
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100