mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
![bors[bot]](/assets/img/avatar_default.png)
4596: Strip leading underscores of argument names in function/method r=matklad a=kuy Closes #4510 ### Goal When I select a function/method from completions, I get a snippet that doesn't contain leading underscores of argument names. ### Solution - Option 1: All signatures don't contain underscores - Option 2: Keep same signature, but inserted snippet doesn't contain underscores I choose Option 2 because I think that leading underscores is a part of "signature". Users should get correct signatures. On the other hand, trimming underscores is an assist by IDE. ### Other impls. rls: Complete argument names with underscores (same as actual ra) IntelliJ Rust: Doesn't complete argument names VSCode (TypeScript): Doesn't complete argument names ### Working example  Co-authored-by: Yuki Kodama <endflow.net@gmail.com>