redhat-developer / redhat-developer/vscode-java
auto completion inserting already-existing text ("overwrite" to the right)
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
code completion unnecessarily not "overwriting" to the right (Java specific? language specific fixes with compile-check "smarter" "smart" acceptSuggestion possible)
TLDR; just look below at image attachments (step 1, 2, 3)
at the basic, this isn't language specific, but language enhancements possible
"overwriting" or "contextual insert" or "surrounding check" or "duplicate surround text" might be a better term
Not sure where to file this at the "editor." level
filing in vscode-java for language specific completion enhancement ability (less so for compile check, mores to not overwrite text that is suppose to be repeated, but ymmv)
discussion
fixes would include:
- just don't write duplicate text
- a property with options (as its possibly "destructive", though I'd prefer the "destructive" option here)
- language specific fix (bonus: detect which actually compiles)
between image 2 and image 3, both [tab] and [enter] seem to have the same results, so maybe this could be considered in configuration (on tab, check/replace same surrounding text, on enter just insert)
tried following settings, no difference observed:
"editor.acceptSuggestionOnEnter": "smart",
"editor.acceptSuggestionOnEnter": "on",
wanted:
"editor.acceptSuggestionOnEnter": "overwrite" or ("replacesame"),
"java.completion.acceptReplaceMode": "compile"
or
"editor.acceptSuggestionSurroundMode": {
"replaceSame": ,
}
Also, separately, but not,
editor.suggestisn't ordering by preexisting surround text- language-specific e.g.
"java.completion.orderByPriorityStaticMode": "preexisting"surround check could handle ordering better - bonus language-specific e.g.
"java.completion.orderByPriorityCompileCheck": "true"surround check could handle ordering
Environment
- Operating System: N/A
- JDK version: N/A
- Visual Studio Code version: 1.82.2
- Java extension version: 1.22.1
- Java Debugger extension version: N/A
Steps To Reproduce
Here's a simple setter-to-fluent workflow change, but I seem to hit this case of not looking at preexisting text to the right
Current Result
see image 3
Expected Result
- don't not overwrite the same text as is being replaced (no idea about ALL cases, but something could be done, but maybe language specific)
- property options on "surrounding smartness"
Additional Informations
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、指定された VS Code および vscode-java のバージョンで setter-to-fluent ワークフローを再現し、Tab と Enter、および指定された候補設定を比較します。ソースファイルもテストも指定されていないため、最初にエディターの補完受け入れ動作と Java 拡張機能との統合箇所を特定します。周囲のテキストが重複して挿入されず、意図した設定または言語固有の動作が検証できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript, vscode
- 領域
- developer-experience, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100