-
-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Milestone
Description
This is with 583ee15 (and Zed editor - I can't test with other editors right now)
Might be the reason for / or connected to: #184
Given this snippet:
@test %{
a: :a,
b: :b
}
After adding a few leading spaces in front of b: :b and doing a reformat with expert - (might have to repeat this several times) there is suddenly an error message unexpected expression after keyword list [...]
expert.log:
04:07:43.093 [debug] handled request client -> server textDocument/hover in 20ms
04:07:43.180 [debug] handled request client -> server textDocument/codeAction in 11ms
04:07:44.562 [error] Formatter failed %SyntaxError{file: "/home/elixir-dev/projects/ganymed/lib/backend/tasks/CreateInvoiceZugferdWithVerification.ex", line: 868, column: 8, snippet: " ],", description: "unexpected expression after keyword list. Keyword lists must always come last in lists and maps. Therefore, this is not allowed:\n\n [some: :value, :another]\n %{some: :value, another => value}\n\nInstead, reorder it to be the last entry:\n\n [:another, some: :value]\n %{another => value, some: :value}\n\nSyntax error after: ','"}
04:07:44.562 [debug] handled request client -> server textDocument/formatting in 26ms
04:07:44.605 [debug] Node port message:
04:07:44.604 [info] Plugins found 0 results in 0.013 ms
Another example:
~H"""
<span class={["mr-3 mb-2 rounded-lg bg-yellow-700 py-1 pr-3 pl-2", @class]}>
{render_slot(@inner_block)}
</span>
"""
Inserting leading spaces in front of {render_slot(@inner_block)}, formatting gives

Metadata
Metadata
Assignees
Labels
No labels