Skip to content

Commit 2670a2f

Browse files
committed
add changelog entry for new code actions
1 parent 686ed13 commit 2670a2f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
## Unreleased
44

5+
- The language server now offers code actions to wrap a function reference in an
6+
anonymous function, or to remove a trivial anonymous function, leaving its
7+
contents. For example:
8+
9+
```gleam
10+
pub fn main() {
11+
[-1, -2, -3] |> list.map(fn(a) { int.absolute_value(a) })
12+
// ^^ Activating the "Remove anonymous function"
13+
// code action here
14+
}
15+
```
16+
17+
would result in:
18+
19+
```gleam
20+
pub fn main() {
21+
[-1, -2, -3] |> list.map(int.absolute_value)
22+
}
23+
```
24+
25+
while the other action would reverse the change. ([Eli Treuherz](http.github.com/treuherz))
26+
527
### Compiler
628

729
- It is now possible to add a custom message to be printed by `echo`, making it

0 commit comments

Comments
 (0)