aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion
Commit message (Collapse)AuthorAgeFilesLines
* Include correct item path for variant completionsJonas Schievink2020-04-241-1/+52
|
* 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
|
* Move CompletionConfig to a separate moduleAleksey Kladov2020-04-241-0/+16
|
* Add test marksAleksey Kladov2020-04-241-0/+4
|
* Introduce ActiveParameterAleksey Kladov2020-04-242-6/+6
|
* Move tests to where they belongAleksey Kladov2020-04-242-231/+231
|
* RefactorAleksey Kladov2020-04-241-24/+18
|
* Restore CompletionItem immutabilityAleksey Kladov2020-04-242-31/+23
|
* More functionalAleksey Kladov2020-04-242-11/+18
|
* MoveAleksey Kladov2020-04-231-9/+9
|
* Merge #3954bors[bot]2020-04-234-5/+321
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 3954: Improve autocompletion by looking on the type and name r=matklad a=bnjjj This tweet (https://twitter.com/tjholowaychuk/status/1248918374731714560) gaves me the idea to implement that in rust-analyzer. Basically for this first example I made some examples when we are in a function call definition. I look on the parameter list to prioritize autocompletions for the same types and if it's the same type + the same name then it's displayed first in the completion list. So here is a draft, first step to open a discussion and know what you think about the implementation. It works (cf tests) but maybe I can make a better implementation at some places. Be careful the code needs some refactoring to be better and concise. PS: It was lot of fun writing this haha Co-authored-by: Benjamin Coenen <[email protected]>
| * Improve autocompletion by looking on the type and nameBenjamin Coenen2020-04-211-3/+1
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * Merge branch 'master' of github.com:rust-analyzer/rust-analyzerBenjamin Coenen2020-04-211-0/+6
| |\
| * | Improve autocompletion by looking on the type and nameBenjamin Coenen2020-04-213-46/+46
| | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | Merge branch 'master' of github.com:rust-analyzer/rust-analyzerBenjamin Coenen2020-04-182-10/+49
| |\ \
| * | | feat: improve dot completions with scoringBenjamin Coenen2020-04-171-5/+1
| | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | feat: improve dot completions with scoringBenjamin Coenen2020-04-173-74/+52
| | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | feat: improve dot completions with scoringBenjamin Coenen2020-04-164-104/+85
| | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | feat: improve dot completions in a struct literal expressionBenjamin Coenen2020-04-153-30/+195
| | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | 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
|