Automatically add `-- ` when pressing enter in a comment

オープン
#279 コメント 8 件 リアクション 2 件 担当者 0 名 GitHub で見る

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
haskell, typescript

調査の方向性

まず、VS Code 拡張機能が Haskell のコメント内で Enter をどのように処理するかを追跡し、-- | で始まるドキュメントコメントに焦点を当てます。通常のコメントを含めるべきか確認し、その後、Enter を押すとドキュメントプレフィックスが継続され、提案された例が説明どおりに動作することを検証します。

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

説明

status: blocked upstream type: enhancement

A minor but nice feature I would like to propose is to automatically add -- on the new line when pressing "enter" in a comment/documentation.

Example (cursor position represented by []) below.

Current behavior

-- | Somme doc[]
foo = "hello world"

Press enter

-- | Somme doc
[]
foo = "hello world"

Proposed behavior

-- | Somme doc[]
foo = "hello world"

Press enter

-- | Somme doc
-- []
foo = "hello world"

I think this default behavior makes much more sense for developers.

To be discussed: should we do the same when in a regular comment? I'd say "no" but I am not strongly opinionated on this one.

Cheers

主要言語
TypeScript
スター
594
フォーク
99
平均マージ
18時間 19分
マージ済み PR(30日)
4

環境構築

はじめの一歩

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

haskell/vscode-haskell のほかの issue

haskell/vscode-haskell の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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