[FEATURE]: code action to fix spelling of all occurences of the symbol?

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

メンテナーはふだん 1 日以内に返信

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

評価

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

調査の方向性

Start by reading the code action implementation and the discussion in issue #150; the issue does not name relevant files or tests. Check how Codebook represents spelling corrections and whether the LSP integration supports symbol rename actions. Done means a correction can offer a rename for all occurrences when another LSP provides that capability.

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

説明

enhancement feedback needed
Feature Description

#150 explains why Codebook typically flags only definitions - this makes a lot of sense.

Wondering then if it would be possible to have a code action that uses another LSP, if present, to rename symbol - not just change this specific spelling. No idea though if "code action calling the code action of another LSP" is technically doable, and / or if this is somehow standardized (do LSP have a standard "rename symbol" tag or name on the corresponding code action? or is it free for all?).

Use Case
def this_hhas_a_typo():
    print("typo!")

this_hhas_a_typo()

if the typo is highlighted in the def line, it would be great to provide a code action to "rename all symbol occurences"; this is typically provided by space-r in helix across programming language LSPs, so I suppose this may be somehow standardized?

Proposed Solution

If possible, have a "mirror" code action for each possible spelling correction that is "replace all symbols by ..." instead of "replace by ..."

Alternative Solutions

For now the user can get the diagnostic, decide what to use, and apply the LSP-based symbol rename themselves by typing themselves what to replace with.

Examples

No response

Additional Context

No response

主要言語
Rust
スター
925
フォーク
59
平均マージ
53分
マージ済み PR(30日)
10

環境構築

はじめの一歩

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

blopker/codebook のほかの issue

blopker/codebook の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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