The custom language plugin I'm implementing supports a language which has scoping braces similar to Java's. In Java code, when I type a closing brace, that brace is automatically unindented to match the indentation level of it's parent block. How would I go about implementing this feature in my custom language? My formatter already formats it correctly, but when I actually type the character it stays at the indentation level for the contents of the block I just closed.
Or, even better, how would I implement automatic insertion of the closing brace when the opening brace is typed?