I wanted the functionality of formatting the document and bringing all the lines in the document at correct indents when a closing curly bracket ('}') is added (like it works in Visual Studio). I could not find a suitable method, so I found the matching bracket token, their respective document line indexes and worked with that. It turns out that when I remove the last '}' of the document and insert it again, the syntax editor and its scroller slows down. Can you please tell me if there is any method or another way to format a document's indents?
Thanks in advance.