Skip to content

Commit 1840b69

Browse files
giacomocavalierilpil
authored andcommitted
update changelog and names
1 parent dcd7df9 commit 1840b69

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

CHANGELOG.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,20 @@
154154
both within a module and across multiple modules.
155155
([Surya Rose](https://github.com/GearsDatapacks))
156156

157-
- The language server now offers a code action to remove `echo`. For example:
157+
- The language server now offers a code action to remove all `echo`s in a
158+
module. For example:
158159

159160
```gleam
160161
pub fn main() {
161162
[1, 2, 3]
162163
|> echo
163164
// ^^^^ If you put your cursor over here
164165
|> list.filter(int.is_even)
166+
|> echo
165167
}
166168
```
167169

168-
Triggering the code action would remove the `echo` pipeline step:
170+
Triggering the code action would remove all the `echo` pipeline steps:
169171

170172
```gleam
171173
pub fn main() {
@@ -174,7 +176,7 @@
174176
}
175177
```
176178

177-
This would also work with `echo` used before an expression:
179+
This also works with all the `echo`s used before an expression:
178180

179181
```gleam
180182
pub fn main() {

compiler-core/src/language_server/code_action.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5463,7 +5463,7 @@ impl<'ast> ast::visit::Visit<'ast> for FillUnusedFields<'ast> {
54635463

54645464
/// Code action to remove an echo.
54655465
///
5466-
pub struct RemoveEcho<'a> {
5466+
pub struct RemoveEchos<'a> {
54675467
module: &'a Module,
54685468
params: &'a CodeActionParams,
54695469
edits: TextEdits<'a>,
@@ -5475,7 +5475,7 @@ pub struct RemoveEcho<'a> {
54755475
second_to_latest_pipe_step: Option<SrcSpan>,
54765476
}
54775477

5478-
impl<'a> RemoveEcho<'a> {
5478+
impl<'a> RemoveEchos<'a> {
54795479
pub fn new(
54805480
module: &'a Module,
54815481
line_numbers: &'a LineNumbers,
@@ -5515,7 +5515,7 @@ impl<'a> RemoveEcho<'a> {
55155515
}
55165516
}
55175517

5518-
impl<'ast> ast::visit::Visit<'ast> for RemoveEcho<'ast> {
5518+
impl<'ast> ast::visit::Visit<'ast> for RemoveEchos<'ast> {
55195519
fn visit_typed_expr_echo(
55205520
&mut self,
55215521
location: &'ast SrcSpan,

compiler-core/src/language_server/engine.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use super::{
3838
ConvertToUse, ExpandFunctionCapture, ExtractVariable, FillInMissingLabelledArgs,
3939
FillUnusedFields, GenerateDynamicDecoder, GenerateFunction, GenerateJsonEncoder,
4040
InlineVariable, InterpolateString, LetAssertToCase, PatternMatchOnValue,
41-
RedundantTupleInCaseSubject, RemoveEcho, UseLabelShorthandSyntax,
41+
RedundantTupleInCaseSubject, RemoveEchos, UseLabelShorthandSyntax,
4242
code_action_add_missing_patterns, code_action_convert_qualified_constructor_to_unqualified,
4343
code_action_convert_unqualified_constructor_to_qualified, code_action_import_module,
4444
code_action_inexhaustive_let_to_case,
@@ -385,7 +385,7 @@ where
385385
actions.extend(UseLabelShorthandSyntax::new(module, &lines, &params).code_actions());
386386
actions.extend(FillInMissingLabelledArgs::new(module, &lines, &params).code_actions());
387387
actions.extend(ConvertFromUse::new(module, &lines, &params).code_actions());
388-
actions.extend(RemoveEcho::new(module, &lines, &params).code_actions());
388+
actions.extend(RemoveEchos::new(module, &lines, &params).code_actions());
389389
actions.extend(ConvertToUse::new(module, &lines, &params).code_actions());
390390
actions.extend(ExpandFunctionCapture::new(module, &lines, &params).code_actions());
391391
actions.extend(FillUnusedFields::new(module, &lines, &params).code_actions());

0 commit comments

Comments
 (0)