aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Merge branch 'master' of github.com:rust-analyzer/rust-analyzerBenjamin Coenen2020-04-144-5/+22
| |\ \ \
| * | | | Improve autocompletion by looking on the type and name, change ↵Benjamin Coenen2020-04-122-26/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation, include sort in Completions struct Signed-off-by: Benjamin Coenen <[email protected]>
| * | | | Improve autocompletion by looking on the type and nameBenjamin Coenen2020-04-115-24/+26
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | | | Improve autocompletion by looking on the type and nameBenjamin Coenen2020-04-114-9/+143
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | | | | | Merge #4065bors[bot]2020-04-232-7/+217
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4065: Complete unqualified enum names in patterns and expressions r=matklad a=nathanwhit This PR implements the completion described in #4014. The result looks like so for patterns: <img width="542" alt="Screen Shot 2020-04-20 at 3 53 55 PM" src="https://user-images.githubusercontent.com/17734409/79794010-8f529400-831f-11ea-9673-f838aa9bc962.png"> and for `expr`s: <img width="620" alt="Screen Shot 2020-04-21 at 3 51 24 PM" src="https://user-images.githubusercontent.com/17734409/79908784-d73ded80-83e9-11ea-991d-921f0cb27e6f.png"> I'm not confident that the completion text itself is very robust, as it will unconditionally add completions for enum variants with the form `Enum::Variant`. This means (I believe) it would still suggest `Enum::Variant` even if the local name is changed i.e. `use Enum as Foo` or the variants are brought into scope such as through `use Enum::*`. Co-authored-by: nathanwhit <[email protected]>
| * | | | | Update tests to reflect new completionsnathanwhit2020-04-221-1/+1
| | | | | |
| * | | | | Add tests for enum completionnathanwhit2020-04-221-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | Adds tests for completion of enum variants in match arms, if-let statements, and basic expressions.
| * | | | | Complete unqualified enum variants when possiblenathanwhit2020-04-221-5/+26
| | | | | |
| * | | | | Add utility fn for expected type of a nodenathanwhit2020-04-221-1/+12
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | Adds `expected_type_of` to `CompletionContext` to return the expected type of a node, if it is known.
* / | | | Ignore proc-macro in completionEdwin Cheng2020-04-181-0/+6
|/ / / /
* | | | Don\t suggest import itself as a completion for importAleksey Kladov2020-04-171-1/+39
| | | |
* | | | Better snippet when completing trait methodAleksey Kladov2020-04-171-9/+10
| |_|/ |/| |
* | | Align grammar for record patterns and literalsAleksey Kladov2020-04-114-5/+22
| |/ |/| | | | | | | | | The grammar now looks like this [name_ref :] pat
* | Make records grammar more orthogonalAleksey Kladov2020-04-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | We used name [: expr] grammar before, now it is [name :] expr which makes things simpler
* | Rename some tokensAleksey Kladov2020-04-101-2/+2
| |
* | Simpler acessors for keywordsAleksey Kladov2020-04-091-2/+2
| |
* | Drop needless traitAleksey Kladov2020-04-091-14/+16
| |
* | Be consistent about token accesorsAleksey Kladov2020-04-091-1/+4
|/
* Move computation of missing fields into hirAleksey Kladov2020-04-071-50/+9
|
* Add functional update testAleksey Kladov2020-04-071-0/+33
|
* Fix names of test modulesAleksey Kladov2020-04-071-2/+2
|
* A more precise panic macroAleksey Kladov2020-04-071-1/+1
|
* Don't insert !() if there's already someAleksey Kladov2020-04-072-3/+44
|
* Reorder importsAleksey Kladov2020-04-071-3/+6
|
* Better naming for scope completionAleksey Kladov2020-04-072-2/+2
|
* Better naming for path completionAleksey Kladov2020-04-072-0/+0
|
* Fix unnecessary braces warningsLaurențiu Nicola2020-04-062-5/+5
|
* Add parens for enumsAleksey Kladov2020-04-034-46/+175
|
* Generalize call parenthesis insertionAleksey Kladov2020-04-031-27/+46
|
* Remove the second code-path for completing names in patternsAleksey Kladov2020-04-033-70/+28
|
* Unite record completion logic into a single moduleKirill Bulatov2020-04-013-386/+411
|
* Split draftKirill Bulatov2020-04-012-59/+25
|
* Complete only missing fields in patsKirill Bulatov2020-04-011-1/+62
|
* Better names for config structsAleksey Kladov2020-03-314-14/+14
|
* Start stdxAleksey Kladov2020-03-281-24/+21
| | | | This crate will hold everything to small to be worth publishing
* Align namingAleksey Kladov2020-03-241-1/+1
|
* Merge #3694bors[bot]2020-03-241-1/+61
|\ | | | | | | | | | | | | | | 3694: Complete only missing fields r=matklad a=SomeoneToIgnore Co-authored-by: Kirill Bulatov <[email protected]>
| * Code review fixesKirill Bulatov2020-03-241-3/+4
| | | | | | | | Co-Authored-By: Aleksey Kladov <[email protected]>
| * Complete only missing fieldsKirill Bulatov2020-03-231-1/+60
| |
* | Consider references when applying postfix completionsKirill Bulatov2020-03-231-17/+123
|/
* Remove constSteffen Lyngbaek2020-03-193-6/+48
| | | | | - Add test for @ matching - Address comments
* Fixes to more accurately give complete_scope completionsSteffen Lyngbaek2020-03-193-15/+38
| | | | | | | - Exclude const, static, functions form is_pat_binding_and_path (there might be more?) - Add a check to filter out Record Fields - Fix tests
* - Exclude Local Scope for BindPatsSteffen Lyngbaek2020-03-192-58/+16
| | | | | - Exclude BindPats with @ or ref - Remove outdated test and add one testing for ref
* Completition for type name? #3418Steffen Lyngbaek2020-03-192-3/+120
| | | | | | | | Iterate through TupleStructPat's until a MatchArm if one exists. Store in a new is_pat_bind_and_path bool and allow the `complete_scope` to find matches. Added some tests to ensure it works in simple and nested cases.
* Add test, remove printlnsFlorian Diebold2020-03-161-0/+53
|
* Get tests workingFlorian Diebold2020-03-162-2/+13
|
* wipFlorian Diebold2020-03-162-4/+13
|
* Attempt to implement ranking of rules when none matches perfectly (wip)Florian Diebold2020-03-161-1/+38
|
* Make MBE expansion more resilient (WIP)Florian Diebold2020-03-161-0/+37
|
* Fix completion of trait itemsFlorian Diebold2020-03-141-0/+32
| | | | Trait items should be public by default.