File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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-
275### Compiler
286
297- The compiler now supports list prepending in constants. For example:
166144
167145### Language server
168146
147+ - The language server now offers code actions to wrap a function reference in an
148+ anonymous function, or to remove a trivial anonymous function, leaving its
149+ contents. For example:
150+
151+ ``` gleam
152+ pub fn main() {
153+ [-1, -2, -3] |> list.map(fn(a) { int.absolute_value(a) })
154+ // ^^ Activating the "Remove anonymous function"
155+ // code action here
156+ }
157+ ```
158+
159+ would result in:
160+
161+ ``` gleam
162+ pub fn main() {
163+ [-1, -2, -3] |> list.map(int.absolute_value)
164+ }
165+ ```
166+
167+ while the other action would reverse the change. ([ Eli Treuherz] ( http.github.com/treuherz ) )
168+
169169- The "extract function" code action can now be used in pipelines to extract a
170170 part of one into a function. For example, triggering it here:
171171
You can’t perform that action at this time.
0 commit comments