summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-completion
AgeCommit message (Collapse)AuthorLines
2025-01-28Merge pull request #19015 from Wilfred/mdbookLukas Wirth-14/+16
manual: Convert to mdbook
2025-01-28Disable `Receiver` based autoderef temporarilyLukas Wirth-3/+1
2025-01-27Merge pull request #19050 from ChayimFriedman2/iter-selfLukas Wirth-1/+25
fix: Don't suggest `into_iter().method()` on iterators
2025-01-27Don't suggest `into_iter().method()` on iteratorsChayim Refael Friedman-1/+25
2025-01-27Fix #[rustc_deprecated_safe_2024]Chayim Refael Friedman-1/+1
It should be considered by the edition of the caller, not the callee. Technically we still don't do it correctly - we need the span of the method name (if it comes from a macro), but we don't keep it and this is good enough for now.
2025-01-27Merge pull request #19037 from ChayimFriedman2/fix-other-testLukas Wirth-8/+83
fix: In completion's expand, consider recursion stop condition (when we're not inside a macro call anymore) *after* the recursive call instead of before it
2025-01-26Support RFC 2396Chayim Refael Friedman-9/+13
AKA. target_feature 1.1, or non unsafe target_feature.
2025-01-26In completion's expand, consider recursion stop condition (when we're not ↵Chayim Refael Friedman-8/+83
inside a macro call anymore) *after* the recursive call instead of before it This is because our detection is imperfect, and miss some cases such as an impersonating `test` macro, so we hope we'll expand successfully in this case.
2025-01-26Don't complete doc(hidden) enum variants and use treesChayim Refael Friedman-55/+102
Also refactor the check a bit.
2025-01-25Skip redundant path search in `resolve_completion_edits`Lukas Wirth-36/+11
2025-01-25Fix flyimport not filtering via stability of import pathLukas Wirth-12/+50
2025-01-24manual: Convert to mdbookWilfred Hughes-14/+16
Split manual.adoc into markdown files, one for each chapter. For the parts of the manual that are generated from source code doc comments, update the comments to use markdown syntax and update the code generators to write to `generated.md` files. For the weekly release, stop copying the .adoc files to the `rust-analyzer/rust-analyzer.github.io` at release time. Instead, we'll sync the manual hourly from this repository. See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226 for the sync. This PR should be merged first, and that PR needs to be merged before the next weekly release. This change is based on #15795, but rebased and updated. I've also manually checked each page for markdown syntax issues and fixed any I encountered. Co-authored-by: Lukas Wirth <lukastw97@gmail.com> Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
2025-01-24Merge pull request #19012 from ShoyuVanilla/arbitrary-selfLukas Wirth-0/+30
feat: Implement `arbitrary-self-types`
2025-01-24feat: Implement `arbitrary-self-types`Shoyu Vanilla-0/+30
2025-01-24Merge pull request #18993 from ChayimFriedman2/iter-configLukas Wirth-56/+69
feat: Provide a config to control auto-insertion of `await` and `iter()`
2025-01-21Provide a config to control auto-insertion of `await` and `iter()`Chayim Refael Friedman-56/+69
2025-01-21Sort completion items that skip `await` and `iter()` behind those that don'tChayim Refael Friedman-0/+26
I don't think my ranking is perfect, because it places them even behind snippet completions, but this is something.
2025-01-21Cleanup `Name` string renderingLukas Wirth-52/+36
2025-01-21Merge pull request #18977 from ChayimFriedman2/fix-upmappingLukas Wirth-13/+68
fix: Fix missing upmapping in trait impls completion
2025-01-20Fix another bug with completion of trait items inside macrosChayim Refael Friedman-11/+36
This time, when completing the keyword (e.g. `fn` + whitespace). The bug was actually a double-bug: First, we did not resolve the impl in the macro-expanded file but in the real file, which of course cannot work. Second, in analysis the whitespace was correlated with the `impl` and not the incomplete `fn`, which caused fake (where we insert an identifier after the whitespace) and real expansions to go out of sync, which failed analysis. The fix is to skip whitespaces in analysis.
2025-01-20Fix import search not discarding rawnessLukas Wirth-5/+6
2025-01-20Properly record meaningful imports as re-exports in symbol indexLukas Wirth-2/+4
2025-01-19Fix missing upmapping in trait impls completionChayim Refael Friedman-3/+33
2025-01-16Merge pull request #18952 from lh123/add-raw-keyword-completeLukas Wirth-2/+138
feat: complete raw, const keyword
2025-01-16don't complete `raw` in `&mut $0`lh123-7/+31
2025-01-16feat: complete raw, const keywordlh123-2/+114
2025-01-16Minor docs improvementLukas Wirth-16/+16
2025-01-16Add edit test for await skipping completionsLukas Wirth-0/+28
2025-01-16Add missing `#[rust_analyzer::rust_fixture]` annotationsLukas Wirth-1/+5
2025-01-16Merge pull request #18927 from ChayimFriedman2/skip-iter-awaitLukas Wirth-59/+165
feat: Add smart completions that skip `await` or `iter()` and `into_iter()`
2025-01-15Add smart completions that skip `await` or `iter()` and `into_iter()`Chayim Refael Friedman-59/+165
E.g. complete `await.foo()`.
2025-01-13feat: Add dereferencing autocompleteboattime-33/+100
2025-01-10Re-implement rust string highlighting via tool attributeLukas Wirth-22/+52
2025-01-09Merge pull request #18889 from ChayimFriedman2/subtle-completionLukas Wirth-1/+2
fix: Fix actual token lookup in completion's `expand()`
2025-01-09Fix actual token lookup in completion's `expand()`Chayim Refael Friedman-1/+2
It should be left biased, not right biased, because when e.g. the use has typed `h` then requested completion, the `h` is what we want to find, not the next token (which might indeed be inside a macro call). I'm not sure why I wrote `right_biased()` to begin with (I remember I had a reason and not just "both should work"), I might've copied the code in `expand_and_analyze()` (which is wrong, because there it lookups on the speculative file, where right biased will always find the correct token and left biased not). This is still not perfect, because there might not be an identifier already typed then we might still end up in a macro call, but this is the best we can do.
2025-01-08refactor test helpers within ide-completionsVishruth-Thimmaiah-448/+322
2025-01-08Merge pull request #18884 from Veykril/push-xwqkorxozzkqLukas Wirth-30/+27
fix: Fix `env`/`option_env` macro check disregarding macro_rules definitions
2025-01-08fix: Fix `env`/`option_env` macro check disregarding macro_rules definitionsLukas Wirth-30/+27
2025-01-08Merge pull request #18855 from Giga-Bowser/migrate-if-letLukas Wirth-1/+1
internal: Migrate `if let` replacement assists to `SyntaxEditor`
2025-01-07fix: do not offer completions within macro stringsVishruth-Thimmaiah-0/+31
2025-01-07Merge pull request #18853 from ChayimFriedman2/no-completionLaurențiu Nicola-0/+72
Fix case where completion inside macro that expands to `#[test]` was unavailable
2025-01-06internal: `make::expr_prefix` should return `ast::PrefixExpr`Giga Bowser-1/+1
2025-01-06Fix case where completion inside macro that expands to `#[test]` was unavailableChayim Refael Friedman-0/+72
We ignore `#[test]` in the def map, so that's why it failed.
2025-01-06minor: New clippy lintsLukas Wirth-24/+19
2025-01-04Hide synthetic locals from completionsLukas Wirth-0/+85
2025-01-01CleanupLukas Wirth-1/+0
2025-01-01Revamp auto-import exclude configLukas Wirth-35/+44
2025-01-01Simplify completion config path resolutionsLukas Wirth-94/+44
2025-01-01Reduce the default autoimport exclusion listLukas Wirth-71/+83
2025-01-01Allow flyimporting excluded trait items if there is an exact match in the nameChayim Refael Friedman-3/+51
I.e. with `fn foo()`, don't complete at `x.fo|`, but complete (with imports) for `x.foo|`, since this is less likely to have false positives. I opted to only do that for flyimport, even though for basic imports there can also be snippet completion (completing the params list for a method), since this is less universally applicable and seems not so useful.