I’m still experiencing several issues with the new indentation system.
-
“Close Tag” does not de-indent the inserted tag.
-
The new indent_to_bracket setting works great for simple
cases, but it’s incomplete. Example (using the “Erlang” syntax, 4 space indent, | is cursor):
I insert a new function call:
function_foobar() ->
call_a(|
When adding a simple value as the argument, indent_to_bracket works fine:
function_foobar() ->
call_a("a string",
|
However, when i add an expression that starts with a keyword, it doesn’t:
function_foobar() ->
call_a(fun (X) ->
|
It seems like indent_to_bracket will only work while the cursor is in the
same scope as the bracket, or when the expression being indented is more complex than
just a simple expression. Is this by design? My wish would be to make it
work like this instead (indentation being calculated from the start of the bracket)
function_foobar() ->
call_a(fun (X) ->
|
Is there any chance we’ll get indentation via a plugin callback in the future?
That would definitely improve the situation for Erlang.
I’d love to be able to do indentation correcly in my own Erlang plugin since the
current way (a TextMate heritage) doesn’t really work for syntax definitions with
more complex requirements than, say, Ruby or JavaScript.