haskell / haskell/vscode-haskell
Automatically add `-- ` when pressing enter in a comment
- Dominant language
- TypeScript
- Stars
- 597
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
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
```haskell
-- | Somme doc[]
foo = "hello world"
```
Press enter
```haskell
-- | Somme doc
[]
foo = "hello world"
```
# Proposed behavior
```haskell
-- | Somme doc[]
foo = "hello world"
```
Press enter
```haskell
-- | 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
Contributor guide
Assessment
This issue has not been assessed yet.