This is the formatting I want to achieve:
function x() {
$elementOfSomething
.find(".class")
.remove();
}
This is the formatting VSCode does by default:
function x() {
$elementOfSomething
.find(".class")
.remove();
}
The default indentation is 4 spaces. In the second sample, the third and fourth lines are indented by 4 spaces in relation to the previous line. In the first sample, they are indented by 8 spaces. So I want to the default indentation to be 4 spaces but the continuation indentation to be 8 spaces. In NetBeans, there is the setting "continuation indentation" for this. Is there a way to achive such indenation behaviour in VSCode (for JS and Java)?
In VS Code this setting is called "wrapping indent", and this setting is located within the Text Editor category of settings.
Sounds like you want to set your wrapping indent to the "deepIndent" option, which will relatively indent the wrapped line to the width of two tabs. For example, if your tab size setting is 4 spaces, a deepIndent will be 8 spaces.