julia-vim icon indicating copy to clipboard operation
julia-vim copied to clipboard

Add option to avoid extra indentation step with julia_indent_align_funcargs = 0

Open ronisbr opened this issue 3 years ago • 3 comments

Hi!

If you want to follow BlueStyle, then the function declaration with a lot of arguments must be:

function foobar(
    df::DataFrame,
    id::Symbol,
    variable::Symbol,
    value::AbstractString,
    prefix::AbstractString="",
)

If we set julia_indent_align_funcargs = 0, then we can achieve something like this but with an extra alignment step:

function foobar(
        df::DataFrame,
        id::Symbol,
        variable::Symbol,
        value::AbstractString,
        prefix::AbstractString="",
)

Is it possible to add an option to match BlueStyle?

ronisbr avatar May 07 '21 17:05 ronisbr

I need this too

rafaqz avatar Jan 06 '22 16:01 rafaqz

@rafaqz I tried to implement the feature myself. However, it turns out that my VimScript ability is not even close to do this :D

I managed to get what I described, but I broke many things with this :D

What I do in Vim to make things easier is to let it align as it is, and then type vi(<.

ronisbr avatar Jan 06 '22 18:01 ronisbr

If you don't mind hacking on the indent script, I think https://github.com/goerz/vimrc/commit/1785628e9c345df3cc117a5dafb88ac1a4ffa72c fixes this behavior.

goerz avatar Feb 25 '22 22:02 goerz