AndrewRadev/splitjoin.vim

Rust renamed imports are not split correctly

z33ky opened this issue · 2 comments

z33ky commented

When attempting to split renamed imports, all imports are put in a single line.

use my_mod::{Alpha, Beta as _, Gamma};
//turns to
use my_mod::{
    Alpha, Beta as _, Gamma
};
//expected
use my_mod::{
    Alpha,
    Beta as _,
    Gamma,
}

The code didn't have special handling for imports -- I've added one now, and your example should work as expected. Could you try it out and confirm?

z33ky commented

Yes, works here as well. Thanks!