about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-completion
AgeCommit message (Collapse)AuthorLines
2025-09-28Add `all` `any` and `not` attribute completionsA4-Tacks-6/+56
Example --- `#[cfg($0)]` -> `#[cfg(any($0))]`
2025-09-26Merge pull request #20604 from A4-Tacks/cfg-attr-compShoyu Vanilla (Flint)-1/+53
Add cfg_attr predicate completion
2025-09-26Merge pull request #20729 from A4-Tacks/const-param-kwdShoyu Vanilla (Flint)-1/+28
Add const parameter keyword completion
2025-09-24Remove non-ns version of impl_self_ty and impl_traitjackh726-9/+9
2025-09-23Use lower_nextsolver::callable_item_signature instead of ↵Jack Huey-3/+10
lower::callable_item_signature
2025-09-23Add const parameter keyword completionA4-Tacks-1/+28
Example --- ```rust fn foo<c$0>() {} ``` -> ```rust fn foo<const $1: $0>() {} ```
2025-09-23Use ParamEnv in TraitEnvironmentJack Huey-2/+6
2025-09-23Make Field::ty return TypeNsjackh726-2/+10
2025-09-22Merge pull request #20679 from A4-Tacks/no-comp-ty-in-nested-patShoyu Vanilla (Flint)-0/+20
Fix complete type in nested pattern
2025-09-20Fix IfExpr then branch suggestA4-Tacks-8/+82
- And add logic operation suggest Example --- In the old implementation, it always suggested conditions, this is a lot of noise, e.g `contract_checks()~(use std::intrinsics::contract_checks) const fn() -> bool` ```rust fn foo() { if true { c$0 } } ```
2025-09-20Merge pull request #20702 from A4-Tacks/else-not-before-elseShoyu Vanilla (Flint)-3/+133
Fix `else` completion before else keyword
2025-09-19Fix `else` completion before else keywordA4-Tacks-3/+133
Example --- ```rust fn foo() { let x = if true { 1 } el$0 else { 2 }; } ``` **Before this PR**: ```text else~ k [LS] else if~ k [LS] ``` **After this PR**: ```text else if~ k [LS] ```
2025-09-18Merge pull request #20664 from ChayimFriedman2/coerce-nsChayim Refael Friedman-2/+5
fix: Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics
2025-09-17Fix complete type in nested patternA4-Tacks-0/+20
Example --- ```rust struct Foo { num: u32 } struct Bar(Foo); fn foo(Bar($0)) {} ``` **Before this PR**: ```rust struct Foo { num: u32 } struct Bar(Foo); fn foo(Bar(Foo { num$1 }: Foo$0)) {} ``` **After this PR**: ```rust struct Foo { num: u32 } struct Bar(Foo); fn foo(Bar(Foo { num$1 }$0)) {} ```
2025-09-16Merge pull request #20517 from Veykril/veykril/push-wrurmtqppzusLukas Wirth-13/+24
fix: Only compute unstable paths on nightly toolchains for IDE features
2025-09-16fix: Only compute unstable paths on nightly toolchains for IDE featuresLukas Wirth-13/+24
2025-09-15Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnosticsChayim Refael Friedman-2/+5
This started from porting coercion, but ended with porting much more.
2025-09-12Fix extra semicolon before else in let-stmtA4-Tacks-1/+51
Example --- ```rust fn main() { let x = if true { () } $0 else {}; } ``` **Before this PR**: ```rust fn main() { let x = if true { () } else if $1 { $0 }; else {}; } ``` **After this PR**: ```rust fn main() { let x = if true { () } else if $1 { $0 } else {}; } ```
2025-09-10Fix failing tests and fill-in missing detailsShoyu Vanilla-1/+2
2025-09-08Merge pull request #20620 from A4-Tacks/let-else-completionLaurențiu Nicola-17/+220
fix: add `else` keyword completion after `let` statements
2025-09-06Add allow `else` keyword completion in LetStmtA4-Tacks-17/+220
Example --- ```rust fn foo() { let _ = 2 el$0 } ``` -> ```rust fn foo() { let _ = 2 else { $0 }; } ```
2025-09-04Add cfg_attr predicate completionA4-Tacks-1/+53
Example --- ```rust #[cfg_attr($0, must_use)] struct Foo; ```
2025-09-02Deduplicate methods in completion by function ID and not by nameChayim Refael Friedman-8/+47
Because duplicates can be found with traits. Worse, the inherent methods could be private, and we'll discover that only later. But even if they're not they're different methods, and its seems worthy to present them all to the user.
2025-08-25Merge pull request #20423 from ShoyuVanilla/import-2024Chayim Refael Friedman-1/+1
Make import sorting order follow 2024 edition style
2025-08-24Merge pull request #20507 from A4-Tacks/suggest-return-exprChayim Refael Friedman-3/+54
Add ReturnExpr completion suggest
2025-08-24Add ReturnExpr completion suggestA4-Tacks-3/+54
2025-08-23Merge pull request #20513 from A4-Tacks/let-in-let-chainChayim Refael Friedman-3/+17
Add let in let-chain completion support
2025-08-23Fix `else` completion in `let _ = if x {} $0`A4-Tacks-3/+355
2025-08-22Add let in let-chain completion supportA4-Tacks-3/+17
Example --- ```rust fn f() { if true && $0 {} } ``` -> ```rust fn f() { if true && let $1 = $0 {} } ```
2025-08-18Auto-attach database in `Analysis` callsLukas Wirth-6/+5
2025-08-17Cleanup assoc_type_shorthand_candidatesjackh726-4/+2
2025-08-17impl HirDisplay for next_solver::Tyjackh726-1/+6
2025-08-13Merge pull request #20390 from A4-Tacks/if-else-comp-in-args-or-letChayim Refael Friedman-1/+127
Add if..else completions in LetStmt and ArgList
2025-08-13Merge Trait and TraitAlias handlingDeadbeef-15/+2
2025-08-12Make import sorting order follow 2024 edition styleShoyu Vanilla-1/+1
2025-08-09Implement next trait solverjackh726-23/+35
2025-08-05Merge pull request #20381 from A4-Tacks/fix-assign-sugChayim Refael Friedman-0/+82
Add assignment type analysis for ide-completion
2025-08-05Change prev whitespace to prev triviaA4-Tacks-3/+3
2025-08-04Add if..else completions in LetStmt and ArgListA4-Tacks-1/+127
Example === ```rust let x = $0; ``` Old completions: ```rust let x = if $1 { $0 }; ``` This PR current completions: ```rust let x = if $1 { $2 } else { $0 }; ```
2025-08-04Add assignment type analysis for ide-completionA4-Tacks-0/+82
2025-07-31`cargo clippy --fix`Lukas Wirth-351/+306
2025-07-26Migrate PathTransform to SyntaxEditorHayashi Mikihiro-2/+2
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-12Fix assoc type where clause positionA4-Tacks-5/+75
2025-07-03Fix some things with builtin derivesChayim Refael Friedman-0/+4
1. Err on unions on derive where it's required. 2. Err on `#[derive(Default)]` on enums without `#[default]` variant. 3. Don't add where bounds `T: Default` when expanding `Default` on enums (structs need that, enums not). Also, because I was annoyed by that, in minicore, add a way to filter on multiple flags in the line-filter (`// :`). This is required for the `Debug` and `Hash` derives, because the derive should be in the prelude but the trait not.
2025-06-29Remove unnecessary parens in closureyukang-1/+1
2025-06-27Fix completion in when typing `integer.|`Chayim Refael Friedman-1/+43
It should show integer, not floating point methods.
2025-06-26Prettify AST in `PathTransform` if it's coming from a macroChayim Refael Friedman-0/+27
2025-06-24Merge pull request #20036 from Veykril/push-yquvoyrxkksxLukas Wirth-9/+9
Do not default to 'static for trait object lifetimes
2025-06-24Do not default to 'static for trait object lifetimesLukas Wirth-9/+9
We lack trait object default lifetime elision, so `'static` can be wrong at times, confusing the user
2025-06-23Don't run doctestsChayim Refael Friedman-0/+1