✨ Language-Aware Automatic Indentation
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
issue で説明されている現在のエディターのインデント動作を確認し、その後、TextMate の言語文法の処理と、引用されている VSCode の動作を比較します。完了条件は、自動インデントと自動インデント解除がアクティブな言語文法に従い、言語ごとに設定可能で、無効化でき、手動のインデント操作を維持することです。
索引モデルが issue の本文から書いたものです。
説明
Description
It would be great if CodeEdit, given instructions from the language grammar in use for the open file, were able to automatically indent and outdent lines as you type based on accepted style standards. For example, an "if" statement, "for" loop, etc. in most languages would cause the following lines to be indented once, then the closing bracket or statement would be outdented to line up with the original "if" or "for" statement. This functionality should be adjustable by editing settings for the language and able to be disabled entirely for those that prefer manual indentation.
TextMate is a good example to look at for reasonable behavior. The language grammars it uses to handle this functionality are also plist files and very easy to read to see how it's being done. Some plugins also enable this behavior in VSCode, though it's implemented inconsistently there.
Alternatives Considered
Most editors use manual indentation, which I assume CodeEdit will eventually support. Right now it only supports tabbing in (and does at least maintain that indent), but you cannot shift+tab out or use command+[ or command+] to outdent/indent (respectively) lines or selected blocks. Manual indentation works, and should be an option for those who wish to indent in ways inconsistent with language standards, but is far slower than automatic indentation.
Additional Context
No response
Screenshots
Here's an example of TextMate auto-indenting and outdenting a for loop in a shell script (bash). The second line is automatically indented to my configured tab stop, then once I finish typing "done" it outdents it to match for. This also works correctly if "do" is placed on its own line.
https://github.com/user-attachments/assets/76d5a013-7428-4764-8357-e5bdb6b179c8
- 主要言語
- Swift
- スター
- 23k
- フォーク
- 1.2k
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeEditApp/CodeEdit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CodeEditApp/CodeEdit#2190 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 15/100
CodeEditApp/CodeEdit#2195 · リアクション 5 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
CodeEditApp/CodeEdit#2185 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
CodeEditApp/CodeEdit#2181 ·
-
creashes on starting オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
CodeEditApp/CodeEdit#2180 ·
CodeEditApp/CodeEdit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
maxgoedjen/secretive#840 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
manaflow-ai/cmux#13763 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
openwallet-foundation/multipaz#2028 ·