aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Less reallocationsKirill Bulatov2021-03-211-1/+0
| |
* | Use smart case in flyimport items lookupKirill Bulatov2021-03-211-3/+58
| |
* | Merge #8123bors[bot]2021-03-212-10/+50
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | 8123: Do not display unqualified assoc item completions r=SomeoneToIgnore a=SomeoneToIgnore Part of https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/autoimport.20weirdness Removes all flyimport completions for any unqualified associated type, effectively reverting https://github.com/rust-analyzer/rust-analyzer/pull/8095 I've explained the reasoning in the corresponding FIXME and open to discussions. As an alternative way, we could add yet another parameter in the method that's used by the `qualify_path` and enable it for the qualify assists only. Co-authored-by: Kirill Bulatov <[email protected]>
| * Disable unqualified assoc items completion for nowKirill Bulatov2021-03-201-1/+1
| |
| * DocsKirill Bulatov2021-03-201-2/+2
| |
| * Do not query item search by name eagerlyKirill Bulatov2021-03-201-10/+18
| |
| * Do not propose assoc items without qualifiersKirill Bulatov2021-03-201-0/+32
| |
* | Fix incorrect scoping in while expressionsLukas Wirth2021-03-212-13/+40
| |
* | Add label completionLukas Wirth2021-03-214-7/+100
| |
* | Merge #8124bors[bot]2021-03-205-14/+233
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8124: Add basic lifetime completion r=Veykril a=Veykril This adds basic lifetime completion, basic in the sense that the completions for lifetimes are only shown when the user enters `'` followed by a char. Showing them when nothing is entered is kind of a pain, as we would want them to only show up where they are useful which in turn requires a lot of tree traversal and cursor position checking to verify whether the position is valid for a lifetime. This in itself doesn't seem too bad as usually when you know you want to write a lifetime putting `'` to ask for lifetime completions seems fine. ~~I'll take a look at whether its possible to lift the restriction of having to put a char after `'`.~~ This actually already works so I guess this is the clients responsibility, in which case VSCode doesn't like it. ![TYH9gIlyVo](https://user-images.githubusercontent.com/3757771/111886437-c9b02f80-89cd-11eb-9bee-340f1536b0de.gif) Co-authored-by: Lukas Wirth <[email protected]>
| * | Add basic lifetime completionLukas Wirth2021-03-205-14/+233
| |/
* / Don't use an untyped String for ActiveParam trackingLukas Wirth2021-03-202-19/+24
|/
* Store an `AstId` for procedural macrosJonas Schievink2021-03-181-1/+1
|
* Better handling of block doc commentsLukas Wirth2021-03-171-1/+1
|
* don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger2021-03-172-3/+3
|
* avoid converting types into themselves via .into() (clippy::useless-conversion)Matthias Krüger2021-03-172-2/+2
| | | | example: let x: String = String::from("hello world").into();
* Merge #8052bors[bot]2021-03-161-27/+21
|\ | | | | | | | | | | | | | | | | | | 8052: minor style fixes per feedback on #8036 r=JoshMcguigan a=JoshMcguigan cc @matklad - this PR addresses your comments in #8036. changelog fixup #8036 Co-authored-by: Josh Mcguigan <[email protected]>
| * minor style fixes per feedback on #8036Josh Mcguigan2021-03-161-27/+21
| |
* | Merge #8051bors[bot]2021-03-161-3/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | 8051: Fix more unused wariable warnings r=lnicola a=lnicola bors r+ changelog skip Co-authored-by: Laurențiu Nicola <[email protected]>
| * Fix more unused wariable warningsLaurențiu Nicola2021-03-161-3/+3
| |
* | Merge #7498bors[bot]2021-03-164-22/+18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 7498: Clone for update r=matklad a=matklad rowan counterpart https://github.com/rust-analyzer/rowan/pull/93 #6857 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Upgrade rowanAleksey Kladov2021-03-164-22/+18
| | | | | | | | | | | | Notably, new rowan comes with support for mutable syntax trees.
| | |
| \ \
*-. \ \ Merge #7900 #8000bors[bot]2021-03-167-82/+155
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7900: show function params in completion detail r=matklad a=JoshMcguigan This resolves #7842 by updating the detail for function completions from `-> T` to `fn(T, U) -> V`. I added an expicit unit test for this, `ide_completion::render::fn_detail_includes_args_and_return_type`, which passes. Lots of other unit tests fail (~60 of them) due to this change, although I believe the failures are purely cosmetic (they were testing the exact format of this output). I'm happy to go update those tests, but before I do that I'd like to make sure this is in fact the format we want for the detail? edit - I realized `UPDATE_EXPECT=1 cargo test` automatically updates `expect!` tests. Big :+1: to whoever worked on that! So I'll go ahead and update all these tests soon. But I still would like to confirm `fn(T, U) -> V` is the desired content in the `detail` field. 8000: Use hir formatter for hover text r=matklad a=oxalica Fix #2765 , (should) fix #4665 Co-authored-by: Josh Mcguigan <[email protected]> Co-authored-by: oxalica <[email protected]>
| * | | add params_display and ty_displayJosh Mcguigan2021-03-121-9/+17
| | | |
| * | | show function params in completion detailJosh Mcguigan2021-03-127-82/+147
| | | |
* | | | completions: centralize calculation of relevance and ref matchesJosh Mcguigan2021-03-163-50/+172
| |_|/ |/| |
* | | Merge #8035bors[bot]2021-03-153-120/+120
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | 8035: unqualfied_path completions aren't responsible for variant pattern completions r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
| * | unqualfied_path completions aren't responsible for pattern completionsLukas Wirth2021-03-153-120/+120
| | |
* | | implement function completion scoringJosh Mcguigan2021-03-152-1/+76
|/ /
* | Drop non-working markLaurențiu Nicola2021-03-151-2/+0
| |
* | remove expected_name_and_type method on completion context in favor of using ↵Josh Mcguigan2021-03-151-12/+4
| | | | | | | | fields added in #8008
* | update algorithm for determining expected type of completionJosh Mcguigan2021-03-152-26/+286
| |
* | some clippy::performance fixesMatthias Krüger2021-03-151-1/+1
| | | | | | | | | | | | | | use vec![] instead of Vec::new() + push() avoid redundant clones use chars instead of &str for single char patterns in ends_with() and starts_with() allocate some Vecs with capacity to avoid unneccessary resizing
* | increase completion relevance for items in local scopeJosh Mcguigan2021-03-142-30/+86
| |
* | Skip ref_match on same types, remove sorting in testsivan7702021-03-141-38/+25
| |
* | Added both references and original matches to testsivan7702021-03-131-34/+42
| |
* | Fix incorrect DerefMut test reference typeivan7702021-03-131-1/+1
| |
* | Make relevance tests display references, suggest derefs only when neededivan7702021-03-131-15/+83
| |
* | Simplify call site and deref completion testivan7702021-03-131-85/+16
| |
* | Count derefs as matched types if possibleivan7702021-03-131-3/+125
|/
* update relevance score u8 -> u32Josh Mcguigan2021-03-121-2/+2
|
* add relevance score testJosh Mcguigan2021-03-121-0/+60
|
* remove unused CompletionScore enumJosh Mcguigan2021-03-122-12/+1
|
* add completion relevance scoreJosh Mcguigan2021-03-123-23/+58
|
* Unify namingAleksey Kladov2021-03-1213-103/+90
|
* use references in CompletionItem's builderyonip232021-03-1117-166/+183
|
* Future proof completion scoresAleksey Kladov2021-03-093-70/+92
|
* Cleanup auto-ref in completionAleksey Kladov2021-03-092-22/+81
|
* CleanupAleksey Kladov2021-03-091-4/+4
|
* CleanupAleksey Kladov2021-03-092-8/+7
|