-
-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
I use dataclass-like event objects in my current project, like so:
EventBus.notify(node, Events.Explosion.new({
"direction": direction,
"center": global_position,
}))I prefer to format them this way universally in my project. The only part of the expression I want to be multiline is the list that I've defined as explicitly multiline with the trailing comma.
However, if I add a trailing comma and run gdformat, it expands the entire function call to the following:
(
EventBus
. notify(
node,
(
Events
. Explosion
. new(
{
"direction": direction,
"center": global_position,
}
)
)
)
)I don't want it to expand the rest of the expression, it's not very readable like this.
Without a trailing comma it will change the code to the following which, while better than the above, is not to my preferences:
EventBus.notify(node, Events.Explosion.new({"direction": direction, "center": global_position}))I'd like to be able to configure it to force expansion on the list without expanding the entire line.
Metadata
Metadata
Assignees
Labels
No labels