rust/crates
bors[bot] 59adc7bfb6
Merge #4596
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

![Screen Shot 2020-05-25 at 0 03 21](https://user-images.githubusercontent.com/151614/82757771-a05e5b80-9e1d-11ea-9dbc-1263c960e2ae.png)


Co-authored-by: Yuki Kodama <endflow.net@gmail.com>
2020-05-27 12:41:38 +00:00
..
ra_arena Extract messy tree handling out of profiling code 2020-04-25 21:22:40 +02:00
ra_assists Remove unnecessary clone that prevented clippy from moving on 2020-05-22 17:13:14 -04:00
ra_cfg add support of feature flag for runnables #4464 2020-05-23 20:59:18 +02:00
ra_db Fix some clippy perf warnings 2020-05-25 13:35:52 -04:00
ra_flycheck Cleanups 2020-05-15 02:09:30 +02:00
ra_fmt Introduce EffectExpr 2020-05-02 11:21:39 +02:00
ra_hir Pass trivially copy types as copy 2020-05-26 14:12:13 -04:00
ra_hir_def Pass trivially copy types as copy 2020-05-26 14:12:13 -04:00
ra_hir_expand Pass trivially copy types as copy 2020-05-26 14:12:13 -04:00
ra_hir_ty Fix some clippy perf warnings 2020-05-25 13:35:52 -04:00
ra_ide Merge #4596 2020-05-27 12:41:38 +00:00
ra_ide_db KISS SourceChange 2020-05-22 18:04:26 +02:00
ra_mbe Reuse Vec allocations 2020-05-16 22:20:44 +02:00
ra_parser Shrink ra_parser::Event from 32 bytes to 16 bytes 2020-05-16 22:20:44 +02:00
ra_proc_macro proc_macro: add ability to log to stderr and view output in vscode 2020-04-23 01:57:02 +03:00
ra_proc_macro_srv Remove dbg 2020-05-10 06:39:36 +08:00
ra_prof Simplify profiler impl (bubble up Option and shorten code 2020-04-26 00:55:49 +03:00
ra_project_model Make some stuff public so that they can be reused by other tools 2020-05-14 11:14:46 +02:00
ra_syntax Update lexer 2020-05-26 14:35:09 -04:00
ra_text_edit Formalize JoinLines protocol extension 2020-05-21 20:05:33 +02:00
ra_toolchain Simplify match 2020-05-09 22:20:11 +03:00
ra_tt Reduce reallocations in ra_tt::buffer::TokenBuffer::new_inner 2020-05-16 22:20:44 +02:00
rust-analyzer Hover tooltip module name is monospace once again 2020-05-25 23:18:45 -04:00
stdx Use snippets in add function 2020-05-20 01:23:05 +02:00
test_utils Merge pull request #4495 from vsrs/fixture_meta 2020-05-24 15:32:52 +02:00