Question about pathological indentation inside object
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
Description
I'm currently reimplementing [`jsonnet-mode`](https://github.com/tminor/jsonnet-mode)'s indentation function in an effort to follow `jsonnetfmt`'s output as closely as possible. I'm curious if the following indentation is considered correct:
```jsonnet
{
id: 1 +
2 + (
if true then
0
else
3
),
}
```
This seems more natural to me (and it's what the new indentation function yields):
```jsonnet
{
id: 1 +
2 + (
if true then
0
else
3
),
}
```
On a side note, `jsonnet-mode`'s previous maintainer recently transferred ownership to me but [https://jsonnet.org/learning/tools.html](https://github.com/google/jsonnet/blob/08875537f6e350a8d2acbd548bdd997b80cd86c9/doc/learning/tools.html#L53) points to the old location. It redirects correctly, so it probably doesn't really matter!
Contributor guide
Assessment
This issue has not been assessed yet.