aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge #4596bors[bot]2020-05-271-1/+59
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
| * | Trim at presentation layerYuki Kodama2020-05-251-1/+1
| | |
| * | Fix test to consider multiple underscoresYuki Kodama2020-05-251-7/+7
| | |
| * | Separate assertionsYuki Kodama2020-05-251-7/+65
| | |
| * | Reflect test caseYuki Kodama2020-05-251-7/+7
| |/
| |
| \
*-. \ Merge #4625 #4629bors[bot]2020-05-271-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4625: Partially fix displaying inlay hints in Github PR diff views r=matklad a=Veetaha See the comment in https://github.com/rust-analyzer/rust-analyzer/issues/4608#issuecomment-63424257 It partially fixes the left side of diff view (the one where old code is displayed), but the diff editor with new code changes still has `file` scheme and will proceed displaying inlay hints... 4629: Fix the `should_panic` snippet r=matklad a=eminence Closes #4628 Co-authored-by: veetaha <[email protected]> Co-authored-by: Andrew Chin <[email protected]>
| | * | Fix the `should_panic` snippetAndrew Chin2020-05-261-3/+3
| |/ / | | | | | | | | | Closes #4628
* / / Pass trivially copy types as copykjeremy2020-05-261-32/+29
|/ /
* | Merge #4534bors[bot]2020-05-261-0/+59
|\ \ | |/ |/| | | | | | | | | | | | | | | 4534: Add call postfix completion r=matklad a=vain0x To make it easier to wrap an expression with Ok/Some/Rc::new etc. Note I agree with conclusion of the discussion in #1431 that adding many completions is not the way to go. However, this PR still could be justified due to versatility of use. Co-authored-by: vain0x <[email protected]>
| * Add call postfix completionvain0x2020-05-201-0/+59
| | | | | | | | To make it easier to wrap an expression with Ok/Some/Rc::new etc.
* | Cleanup TextEditAleksey Kladov2020-05-211-2/+2
|/
* Switch to new magic marksAleksey Kladov2020-05-203-20/+20
|
* Add AssistConfigAleksey Kladov2020-05-191-1/+1
|
* Fix completion and hover for module and function of same nameHasan Ali2020-05-161-1/+29
|
* Prioritize locals with correct typesAleksey Kladov2020-05-142-5/+55
|
* add more specific match postfix for Result and OptionBenjamin Coenen2020-05-121-15/+43
| | | | Signed-off-by: Benjamin Coenen <[email protected]>
* Merge #4423bors[bot]2020-05-111-0/+26
|\ | | | | | | | | | | | | | | 4423: add tests module snippet r=bnjjj a=bnjjj Request from a friend coming from intellij Rust Co-authored-by: Benjamin Coenen <[email protected]>
| * add tests module snippetBenjamin Coenen2020-05-111-0/+8
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * add tests module snippetBenjamin Coenen2020-05-111-0/+18
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | add if let and while let postfix for Option and ResultBenjamin Coenen2020-05-101-38/+44
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | add if let and while let postfix for Option and Result #4348Benjamin Coenen2020-05-071-1/+199
|/ | | | Signed-off-by: Benjamin Coenen <[email protected]>
* MinorAleksey Kladov2020-05-061-1/+2
|
* Rename AtomTextEdit -> IndelAleksey Kladov2020-05-052-4/+4
|
* Rename ImplItem to AssocItemEdwin Cheng2020-05-052-21/+27
|
* Remove false positive attr compleitonsAleksey Kladov2020-05-042-4/+40
|
* Qualify ast typesAleksey Kladov2020-05-041-6/+5
|
* Cleanup importsAleksey Kladov2020-05-041-4/+6
|
* Fix derive argument parsingKirill Bulatov2020-05-021-26/+40
|
* Propose custom derives in completionKirill Bulatov2020-05-021-8/+32
|
* Complete standard derivesKirill Bulatov2020-05-022-16/+245
|
* Introduce EffectExprAleksey Kladov2020-05-021-1/+1
|
* if let -> matchJonas Schievink2020-04-291-4/+3
|
* Complete assoc. items on type parametersJonas Schievink2020-04-291-11/+262
|
* Better filtering of qualified enum variants in completionAleksey Kladov2020-04-292-9/+49
|
* Complete union fields after dotJonas Schievink2020-04-281-0/+38
|
* Precompute expected type during completionAleksey Kladov2020-04-263-35/+44
|
* Fix broken testJonas Schievink2020-04-251-1/+1
|
* Don't add call parens when an fn type is expectedJonas Schievink2020-04-251-0/+56
|
* Rename StructField -> FieldAleksey Kladov2020-04-251-6/+1
|
* text-size 1.0.0Aleksey Kladov2020-04-251-6/+6
|
* Convert tests to text-sizeAleksey Kladov2020-04-2513-790/+789
|
* Convert code to text-sizeAleksey Kladov2020-04-254-14/+15
|
* Merge #4128bors[bot]2020-04-241-1/+52
|\ | | | | | | | | | | | | | | 4128: Include correct item path for variant completions r=matklad a=jonas-schievink The test would previously suggest `E::V`, which is not enough to name the variant as the enum is in a module. Now it correctly suggests the full path `m::E::V`. Co-authored-by: Jonas Schievink <[email protected]>
| * Include correct item path for variant completionsJonas Schievink2020-04-241-1/+52
| |
* | Don't omit methods with self from path completionJonas Schievink2020-04-241-6/+38
|/
* Adds attribute completions (#3941)Roberto Vidal2020-04-243-0/+592
|
* Better label for macros completionAleksey Kladov2020-04-245-48/+59
|
* Honor snippet capabilityAleksey Kladov2020-04-241-0/+6
| | | | closes #2518
* Make sure that adding a snippet requires corresponding capabilityAleksey Kladov2020-04-246-44/+107
|
* Introduce internal snippet capAleksey Kladov2020-04-241-0/+13
|