aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions
Commit message (Collapse)AuthorAgeFilesLines
* Make CompletionContext expected_type smarterLukas Tobias Wirth2021-05-031-22/+0
|
* Fix feature description inconsistencyBrandon2021-05-011-1/+1
|
* Add cov_marks to insert_use testsLukas Wirth2021-04-201-1/+1
|
* Exclude inherent traits from flyimportsKirill Bulatov2021-04-161-0/+23
|
* Do not show flyimports in trait or impl declarationsKirill Bulatov2021-04-151-0/+50
|
* Fix typomemoryruins2021-04-071-2/+2
|
* Do not import on the fly during fields of record literal syntaxmemoryruins2021-04-061-0/+43
|
* Resolve associated typesLukas Wirth2021-04-011-1/+1
|
* Merge #8267bors[bot]2021-03-311-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8267: Adding gifs and screenshots for features in manual r=matklad a=MozarellaMan For #6539 This includes most of gif or screenshot examples of most items in the "Features" header. With the exceptions of: - **On Typing Assists** - couldn't get it to work for a demo, I'm probably missing something? - **Structural search and replace** - looked to be already a visual example of the feature - **Workspace symbol** - wasn't sure how best to show this, all of the examples maybe? Also wasn't sure of the best code example to show it off - **Semantic Syntax Highlighting** - seemed obvious enough to not need a screenshot, but I could easily add this All the gifs/pngs are hosted in this [comment](https://github.com/rust-analyzer/rust-analyzer/issues/6539#issuecomment-809574840). Please let me know if any of them aren't suitable (and why) and I'll improve it! Or if you don't like the theme/font Co-authored-by: Ayomide Bamidele <[email protected]>
| * Gifs and screenshots for features in manualAyomide Bamidele2021-03-311-0/+2
| |
* | Rename target_ty to self_tyLukas Wirth2021-03-292-2/+2
|/
* Merge hir::MacroDef::is_* into hir::MacroDef::kindLukas Wirth2021-03-231-1/+2
|
* implement a temporary workaround for #8058Josh Mcguigan2021-03-221-1/+1
|
* Merge #8132bors[bot]2021-03-211-0/+31
|\ | | | | | | | | | | | | | | 8132: Add `'` to trigger_characters, allowing more direct lifetime completions r=Veykril a=Veykril Fixes having to type a character after `'` to complete lifetimes and labels Co-authored-by: Lukas Wirth <[email protected]>
| * Add `'` to trigger_characters, allowing more direct lifetime completionsLukas Wirth2021-03-211-0/+31
| |
* | Use smart case in flyimport items lookupKirill Bulatov2021-03-211-3/+58
| |
* | Merge #8123bors[bot]2021-03-211-0/+32
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | 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
| |
| * Do not propose assoc items without qualifiersKirill Bulatov2021-03-201-0/+32
| |
* | Fix incorrect scoping in while expressionsLukas Wirth2021-03-211-0/+29
| |
* | Add label completionLukas Wirth2021-03-211-1/+76
| |
* | Add basic lifetime completionLukas Wirth2021-03-202-1/+182
|/
* don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger2021-03-171-2/+2
|
* avoid converting types into themselves via .into() (clippy::useless-conversion)Matthias Krüger2021-03-171-1/+1
| | | | example: let x: String = String::from("hello world").into();
* Merge #7498bors[bot]2021-03-162-4/+5
|\ | | | | | | | | | | | | | | | | | | 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-162-4/+5
| | | | | | | | Notably, new rowan comes with support for mutable syntax trees.
| |
| \
*-. \ Merge #7900 #8000bors[bot]2021-03-164-69/+69
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
| * | show function params in completion detailJosh Mcguigan2021-03-124-69/+69
| | |
* | | unqualfied_path completions aren't responsible for pattern completionsLukas Wirth2021-03-152-102/+102
| |/ |/|
* | 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
* Unify namingAleksey Kladov2021-03-128-69/+61
|
* use references in CompletionItem's builderyonip232021-03-118-79/+86
|
* Merge #7873 #7933bors[bot]2021-03-091-48/+222
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7873: Consider unresolved qualifiers during flyimport r=matklad a=SomeoneToIgnore Closes https://github.com/rust-analyzer/rust-analyzer/issues/7679 Takes unresolved qualifiers into account, providing better completions (or none, if the path is resolved or do not match). Does not handle cases when both path qualifier and some trait has to be imported: there are many extra issues with those (such as overlapping imports, for instance) that will require large diffs to address. Also does not do a fuzzy search on qualifier, that requires some adjustments in `import_map` for better queries and changes to the default replace range which also seems relatively big to include here. ![qualifier_completion](https://user-images.githubusercontent.com/2690773/110040808-0af8dc00-7d4c-11eb-83db-65af94e843bb.gif) 7933: Improve compilation speed r=matklad a=matklad bors r+ 🤖 Co-authored-by: Kirill Bulatov <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]>
| * Less lifetines: derive SemanticsScope in placeKirill Bulatov2021-03-081-3/+8
| |
| * Restrict fuzzy qualifiers for nowKirill Bulatov2021-03-081-4/+3
| |
| * Test for fuzzy unresolved path maatchKirill Bulatov2021-03-081-0/+22
| |
| * Fix the completion labels and testsKirill Bulatov2021-03-081-11/+23
| |
| * Work towards better import labelsKirill Bulatov2021-03-081-47/+54
| |
| * Update the docsKirill Bulatov2021-03-081-0/+39
| |
| * SimplifyKirill Bulatov2021-03-081-25/+18
| |
| * Refactor the import locationKirill Bulatov2021-03-081-60/+5
| |
| * Do not propose already imported importsKirill Bulatov2021-03-081-16/+7
| |
| * Properly handle turbofishes in qualifiersKirill Bulatov2021-03-081-1/+1
| |
| * Fix some testsKirill Bulatov2021-03-081-5/+60
| |
| * Return more data about located importsKirill Bulatov2021-03-081-13/+10
| |
| * Draft the qualifier import resolutionKirill Bulatov2021-03-081-3/+81
| |
| * Test and initial refactoringKirill Bulatov2021-03-081-3/+34
| |
* | Fix formatDuong Do Minh Chau2021-03-091-9/+2
| |
* | Add trailing commasDuong Do Minh Chau2021-03-091-2/+2
| |
* | Update the test to match the changeDuong Do Minh Chau2021-03-091-0/+4
| |