Skip to content

Commit bbefe3c

Browse files
committed
chore: CHANGELOG entry
1 parent ed0f664 commit bbefe3c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

CHANGELOG.md

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

33
## Unreleased
44

5+
### Language server
6+
7+
- The language server nof offers code action to add type annotations to all
8+
functions and constants. For example,
9+
10+
```gleam
11+
pub const answer = 42
12+
13+
pub fn add(x, y) {
14+
x + y
15+
}
16+
17+
pub fn add_one(thing) {
18+
// ^ Triggering "Annotate all top level type definitions" code action here
19+
let result = add(thing, 1)
20+
result
21+
}
22+
```
23+
24+
Triggering the "Annotate all top level type definitions" code action over
25+
the name of function `add_one` would result in following code:
26+
27+
```gleam
28+
pub const answer: Int = 42
29+
30+
pub fn add(x: Int, y: Int) -> Int {
31+
x + y
32+
}
33+
34+
pub fn add_one(thing: Int) -> Int {
35+
let result = add(thing, 1)
36+
result
37+
}
38+
```
39+
40+
([Andrey Kozhev](https://github.com/ankddev))
41+
542
### Bug fixes
643

744
- Fixed a bug where the "Extract function" code action would not properly

0 commit comments

Comments
 (0)