Visual studio + fold functions?

Hi,

I use visual studio code with rustfmt as default on save. It works awesome, I love how the code looks in general, except that with long list of function parameters, rustfmt ends up putting each parameter on individual line. That makes the code look too long and hard to scroll through/eyeball. I was looking for some plugin/some way to just fold all the function parameters and just show the function like say 'foobar(...)' - I can't find anyway to do that in visual studio code, anyone has any ideas ?

Rgds,
Gopa.

1 Like

You're probably looking for this setting fn_args_layout.

1 Like

Thx for the response. Regardless of whether I use compressed or tall or vertical, the below function call pasted as example, remains the same - ie its just a multi line function call. So you can imagine if I have a lot of such function calls in my code, its many lines of code that occupies real estate when browsing my code

    if parse_or_maxlen(
        key,
        flow,
        reginfo,
        tuns,
        next_tun_idx,
        poll,
        gw_onboarded,
        pkt_pool,
        tcp_pool,
        &pending[0..],
    )

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.