In the Haxe programming language, you can specify the type of the return value of a function with a colon.
function funcName() : ReturnType { }
This becomes a problem when using emacs with haxe-mode. Whenever I try to enter a newline, the point is automatically indented to the column as to where the ":" character is found.
Here's a gif that better explains what I mean:
As you can see, creating a newline after the first function works fine. But on the second function (the one with a return datatype of ": Void"), we can see that the newline is indented at the same column of the ":" character in ": Void".
I tried disabling electric-indent-mode
similar to the one found here but it did not do anything. I tried messing around with tab spacings but to no avail.
I would appreciate some help with this one.
Notes: