feature: Public API for companion review plugins?

Abierto
#577 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
15/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
lua, neovim

Línea de trabajo

This is an API design question, not a bug report. Start with the existing CodeDiffOpen, CodeDiffClose and CodeDiffFileSelect events and the public navigation functions the issue mentions, and check which of the three requested capabilities (reading the active comparison, jumping to a line or range, and a ready/refresh event) they already cover. Done means a maintainer decides the public surface, and the issue has no comments or decision yet, so wait for that before writing code.

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

Descripción

I have a fork with AI summaries for what changed and why, plus line-by-line explanations of selected code. I'd like to move those into a separate companion plugin and add a guided review that walks through related changes in order, using CodeDiff as the diff viewer.

The main thing I'm trying to figure out is how to do that without depending on CodeDiff's internal modules. Right now my changes use session state, diff buffers, and refresh internals.

Would you be open to a small public API that lets a companion plugin:

  • Read the active comparison: repository, revisions, selected file, old/new buffers, and changed ranges.
  • Select a file and jump to a line or range on either side of the diff.
  • Get an event after the diff is ready or refreshed, so explanations can be updated or cleared when the code changes.

I saw the existing CodeDiffOpen, CodeDiffClose, and CodeDiffFileSelect events and the public navigation functions. Is there already a supported way to cover the rest, or would adding a few extension points make sense? Of course, I'm happy to help work on this api, I don't expect you to just do it for me.

The companion would handle the AI connection, prompts, explanations, and tour state. CodeDiff would handle displaying the diff. I'd like to get your thoughts on the approach before building more around the internals.

Lenguaje dominante
Lua
Estrellas
1.6k
Forks
104
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 esmuellert/codediff.nvim

Todos los issues de esmuellert/codediff.nvim

Issues similares

Más issues de Lua

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.