Repository navigation
feat: 複数行コメントの対象範囲を表示する - #237
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
コメント更新後もカーソル範囲のextmarkが古い位置に残る問題を修正する必要があります。
3 open findings
コメント再描画時に古い行ヒントが残る · New number_hl_groupのrelativenumber対応を欠く説明 · New コメント行ではなく先頭行を示す曖昧な説明 · New
What changed in this PR
複数行コメントの対象範囲を、見出し・行番号・カーソル連動マーカーで可視化する変更です。
Changes:
- 複数行範囲の抽出・ラベル生成を追加
- extmarkによる行番号強調と開始位置マーカーを追加
- 設定、ドキュメント、単体・統合テストを更新
| File | Description |
|---|---|
lua/fude/comments/data.lua |
複数行範囲の収集処理 |
lua/fude/comments.lua |
範囲収集APIの公開 |
lua/fude/ui/format.lua |
範囲ラベルの整形 |
lua/fude/ui/inline.lua |
コメント見出しへの範囲表示 |
lua/fude/ui/extmarks.lua |
行番号強調と開始マーカー |
lua/fude/ui.lua |
整形APIの公開 |
lua/fude/config.lua |
表示設定の追加 |
tests/fude/comments_spec.lua |
範囲収集テスト |
tests/fude/ui_spec.lua |
ラベル・見出しテスト |
tests/fude/extmarks_integration_spec.lua |
extmark統合テスト |
README.md |
設定例の追加 |
doc/fude.txt |
ヘルプと設定仕様の追加 |
CLAUDE.md |
アーキテクチャ説明の更新 |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…dicator # Conflicts: # CLAUDE.md
…dicator # Conflicts: # CLAUDE.md
Comment on lines
+555
to
+559
| if current_hint.buf ~= buf then | ||
| return | ||
| end | ||
| M.clear_inline_hint() | ||
| M.update_inline_hint() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


概要
複数行コメントはその範囲の最終行にだけ表示されるため、どこから始まる範囲へのコメントなのかがわからなかった。範囲をラベル、行番号の色、カーソル連動の表示で示すようにする。
Closes #131
before
after
変更内容
Comment L20-L29 [pending])[resolved thread]と同じくスレッド先頭のボックスにだけ出し、返信には繰り返さないcomment_range.number_hl、両スタイル共通)number_hl_groupを使い、sign columnや本文の背景を使わない。gitsignsのサインやdiffの背景色と取り合わないようにするためcomment_range.cursor_number_hlに切り替え、開始行の行末に↓ comment L20-L29を出すline_hl_group)での範囲ハイライトも試したが、diffの色を塗りつぶして読みづらくなったので採用しなかったfalseで無効にできるテスト計画
make all)tests/fude/comments_spec.lua(get_multiline_ranges)、tests/fude/ui_spec.lua(format_line_range、build_range_start_marker、見出しラベル)、tests/fude/extmarks_integration_spec.lua(行番号の色付け、カーソル連動の表示と解除、背景を使わないこと、各設定の無効化)備考
number/relativenumberが無効だと見えないGenerated with Claude Code