insertNewlineAndIndent
Insert a newline and indent using language-aware indentation when available, falling back to copying leading whitespace.
When the cursor is between matching brackets (e.g., {|}), performs "bracket explosion": inserts two newlines so the closing bracket ends up on its own line, with the cursor indented on the middle line.