Bug 425229

Summary: Brackets are not automatically expanded on return in Rust files
Product: [Applications] kate Reporter: Robin Bürkli <robuba.jr>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: aspotashev, justin.zobel, waqar.17a
Priority: NOR    
Version First Reported In: 20.04.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Robin Bürkli 2020-08-11 17:33:06 UTC
SUMMARY

In Rust files, when I write e.g. a new function, if statement or for loop, the curly brackets are not automatically expanded as they do in *.c files, for example.

STEPS TO REPRODUCE
1. Create new *.rs file
2. Enter something like 'fn test(){}'
3. With the cursor inside the curly brackets hit return

OBSERVED RESULT

fn test(){
}

EXPECTED RESULT

fn test() {
    (with indentation)
}

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Comment 1 Justin Zobel 2020-10-27 08:26:01 UTC
Tested rust and c and can confirm that rust does not automatically indent or provide a new line where c does.

Tested on git master.
Comment 2 Waqar Ahmed 2023-02-18 14:37:21 UTC
Not reproducible anymore so closing this. Our indenters got a lot of fixes in the last year so probably this was also fixed