59adc7bfb6
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> |
||
---|---|---|
.. | ||
completion | ||
display | ||
references | ||
snapshots | ||
syntax_highlighting | ||
typing | ||
call_hierarchy.rs | ||
call_info.rs | ||
completion.rs | ||
diagnostics.rs | ||
display.rs | ||
expand_macro.rs | ||
extend_selection.rs | ||
folding_ranges.rs | ||
goto_definition.rs | ||
goto_type_definition.rs | ||
hover.rs | ||
impls.rs | ||
inlay_hints.rs | ||
join_lines.rs | ||
lib.rs | ||
matching_brace.rs | ||
mock_analysis.rs | ||
parent_module.rs | ||
prime_caches.rs | ||
references.rs | ||
runnables.rs | ||
ssr.rs | ||
status.rs | ||
syntax_highlighting.rs | ||
syntax_tree.rs | ||
typing.rs |