Closed dantswain closed 8 years ago
It looks like cino
/cinoptions
should control this, but it doesn't seem to work in the Elixir plugin for me: http://vimdoc.sourceforge.net/htmldoc/indent.html#cinoptions-values
@kassio I'm now getting a single space indent:
defmodule Sample do
def add(x, y) do
x + y
end
def double(x) do
add(x,
y)
end
end
@dantswain one question, why don't you use like:
defmodule Sample do
def add(x, y) do
x + y
end
def double(x) do
add(
x,
y
)
end
end
My personal flavor. 😄
That does work for me. It still seems weird that I would get a single space, and ideally I think it should honor cinoptions?
I'm also now running into this:
defmodule Sample do
defstruct([
foo: nil
])
alias Foo.Bar
def add(x, y) do
x + y
end
def double(x) do
add(
x,
y
)
end
end
I tried cinoptions, but it wasn't the bug. The counter of opening/closing symbols set this space, I'm not sure why.
This last example's a real problem. I'll work on that ASAP.
This could be intended behavior, but I don't think so? This is what I am getting:
Note the
I would expect
y)
to be indented - either a fixed number of spaces or (personal preference) aligned with the arguments on the previous line.It could be that I have a setting in my vimrc that is clobbering this, but I've had no luck finding it.