microsoft / microsoft/vscode-cpptools
Request: Smart indentation on preprocessor directives
オープン
まだ誰も着手していません。
Feature Request
Language Service
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
説明
Hi,
Sometimes I would like to write some code like this:
#ifdef _SOME_COND_
xxx;
yyyy;
zzzzz;
#endif
However currently in VS Code the "closing" directives are not automatically outdented, so I end up something like this:
#ifdef _SOME_COND_
xxx;
yyyy;
zzzzz;
#endif
I hope the directives like #else, #elif, #endif can be automatically aligned to the nearest #if, #ifdef, or other corresponding "opening" directives.
Please consider this. Thank you.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ファイル名もテストも指定されていません。まず、VS Code C/C++ extension におけるプリプロセッサディレクティブのインデント処理を探し、次に #if、#ifdef、#else、#elif、#endif がどのように認識されるかを追跡してください。提示された C の例で、終了ディレクティブと代替ディレクティブが対応する開始ディレクティブと揃えば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp, typescript, vscode
- 領域
- developer-experience, tooling
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100