feature: Public API for companion review plugins?

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
lua, neovim

調査の方向性

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.

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

説明

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.

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

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

esmuellert/codediff.nvim のほかの issue

esmuellert/codediff.nvim の issue をすべて見る

似ている issue

Lua の issue をもっと見る

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

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