Identation in Juno

I like to write lists and list comprehensions in multiple lines like:

a = [
    1,
    2
]

This is fine in Julia, but In Juno, however, this doesn’t work. I have to write one of those two versions:

a = [
    1,
    2
    ]

begin
    a = [
        1,
        2
    ]
end

Is it planed to enable writing the first version at some point or does anybody know how I can fix this in atom by myself?

1 Like

I copy and pasted the first one into Juno (both in a file and in the console), and it works fine. What error do you get when you input the first one?

That’s interesting! It also works for me in the console and in a file if I eval the whole file, but I get

syntax: incomplete: premature end of input

if I eval on the first three lines and

syntax: unexpected “]”

on the last line.