Skip to content

Lines -> Auto Indent (editor:auto-indent) misinterprets end) #18

@jamesjahraus

Description

@jamesjahraus

When end) it is interpreted as the end of the function, and incorrectly formats the module.

Example from: https://howistart.org/posts/elixir/1

Lines -> Auto Indent (editor:auto-indent)

defmodule Portal.Door do
...
-- def pop(door) do
---- Agent.get_and_update(door, fn
---- [] -> {:error, []}
---- [h|t] -> {{:ok, h}, t}
---- end)
end
end

The auto-indent interprets end) as end for def pop.

Expected the auto-indent interprets end) as end for Agent.get_and_update:

defmodule Portal.Door do
...
--def pop(door) do
---- Agent.get_and_update(door, fn
---- [] -> {:error, []}
---- [h|t] -> {{:ok, h}, t}
---- end)
--end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions