Open
Description
Check for existing issues
- Completed
Describe the bug / provide steps to reproduce it
In most functions, Zed adds the correct indentation when putting the cursor after the {
and adding a newline
fn write(file: File, text: String) {
| <- cursor here
io.println("\"" <> text <> "\" -> " <> file.path)
}
However, for this edge case, indentation is not applied:
fn write_to_file(
path: String,
file_actions: fn(File) -> Nil,
) -> Result(Nil, Nil) {
| <- cursor here
use file <- result.try(open_file(path))
file_actions(file)
close_file(file)
Ok(Nil)
}
Something about the function signature being broken across multiple lines is problematic.
Metadata
Assignees
Labels
No labels
Activity