You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preserving it, not that much (we'd need to save state in some way), but I did just merge #148 which gives you an option to use flow style for lists. Would that do?
Sadly there is no sane way to decide when to use flow and when to use block. And there is no simple way yo save the previous state of the yaml. Even if we do save the state, we would need to decide whether or not to invalidate it if an element is mutated before serializing back to yaml.
The only potential way I see for something like this is by using something like this:
Activity
gabriel-samfira commentedon Oct 24, 2024
Hi @MrHinsh
Preserving it, not that much (we'd need to save state in some way), but I did just merge #148 which gives you an option to use
flowstyle for lists. Would that do?MrHinsh commentedon Oct 24, 2024
Flow is great except when the item is really long... It makes sense for short strings
gabriel-samfira commentedon Oct 24, 2024
Sadly there is no sane way to decide when to use flow and when to use block. And there is no simple way yo save the previous state of the yaml. Even if we do save the state, we would need to decide whether or not to invalidate it if an element is mutated before serializing back to yaml.
The only potential way I see for something like this is by using something like this:
And set a property on a field which indicates which style to use for that element and its children.
gabriel-samfira commentedon Oct 25, 2024
Discussions have been enabled.