Code style scheme for 1TBS (javscript/ json)
Hi guys, would anyone know if it would be possible to have 1TBS (one true brace style) type of scheme for brackets in IntelliJ?
I want to use the following type of nested objects in arrays
"some": [{
"foo": "bar"
}]
IntelliJs code style only allows me to format it like some GNU style of indentation:
"some": [
{
"foo": "bar"
}
]
Please sign in to leave a comment.
Settings | Editor | Code Style | JavaScript | Wrapping and Braces, Array initializer:
- Do not wrap
- New line after '[' = off
- Place ']' on new line = off
To format
to
make sure to turn 'Keep line breaks' off
What about doing this in JSON?
Hi Elena,
thank you for your swift response. This works for javascript files. However, would it be possible to achieve the same for JSON? There seem to be considerately less options for JSON.
there is no such option for JSON unfortunately. Please feel free to create a request for it in youtrack, https://youtrack.jetbrains.com/issues/WEB