For lang like c/c++, the scope is enclosed by {...}, and since Emacs's electric-paren-mode can automatically insert } after we type {, we can then hit Enter and make the scope multi-line with the scope already been enclosed by the automatic inserted }.
For julia, scopes are enclosed by end. I found it is not convenient to enter end manually every time. It would be better to have similar behavior as c/c++. I think this might be possible by using tree-sitter, but I'm not familiar with that.