aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src
Commit message (Collapse)AuthorAgeFilesLines
* Add flyimport completion for trait assoc itemsKirill Bulatov2021-01-166-56/+296
|
* Unindent the testKirill Bulatov2021-01-161-22/+22
|
* Use specific kind for the flyimport completionsKirill Bulatov2021-01-161-5/+10
|
* Share import_assets and related entitiesKirill Bulatov2021-01-166-255/+311
|
* Remove useless wrapperAleksey Kladov2021-01-151-5/+3
|
* Insert `;` when completing keywords in letAleksey Kladov2021-01-152-7/+69
|
* SimplifyAleksey Kladov2021-01-151-27/+19
|
* Add braces when completing ifsAleksey Kladov2021-01-151-2/+2
|
* Introduce more appropriate assertion mechanismAleksey Kladov2021-01-143-6/+7
| | | | | | | rust-analyzer is a long-running program, so we *should* handle assertion failures. See also https://www.sqlite.org/assert.html.
* Add a test for #7110Aleksey Kladov2021-01-141-0/+31
|
*-. Merge #7051 #7219 #7245 #7246bors[bot]2021-01-111-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7051: Check dbg! macro in tidy_test r=matklad a=edwin0cheng Same as `check_todo` but for dbg! macro r? @matklad 7219: Refactor rename name checking r=matklad a=Veykril Improves the user facing error messages a bit and prevents renaming to `_` when the name is referenced as this would change source to not compile anymore since `_` is only a pattern, not a proper identifier. 7245: Encourage gifs r=matklad a=matklad bors r+ 🤖 7246: Unfreeze cargo_metadata r=matklad a=kjeremy It now pulls in a newer version of semver-parser. This does add a dependency on `cargo-platform` in the interest of correctness. Co-authored-by: Edwin Cheng <[email protected]> Co-authored-by: Lukas Wirth <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]> Co-authored-by: kjeremy <[email protected]>
| * | Use another name instead of dbg for testEdwin Cheng2021-01-081-4/+4
| |/
* | Merge #7235bors[bot]2021-01-111-1/+25
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 7235: Postfix completions like ifl now works with references r=Veykril a=Maan2003 Closes #7230 Co-authored-by: Manmeet <[email protected]> Co-authored-by: Manmeet Maan <[email protected]>
| * | Fix formattingManmeet Maan2021-01-111-1/+1
| | |
| * | Apply Suggestions from code reviewManmeet Maan2021-01-111-9/+6
| | |
| * | Postfix like ifl now works with referencesManmeet2021-01-101-2/+29
| | |
* | | Replace SyntaxKind usage with T! macro where applicableLukas Wirth2021-01-103-12/+11
|/ /
* / Avoid string copy in complete_attributeLaurențiu Nicola2021-01-101-6/+8
|/
* Simplify mod completionLukas Wirth2021-01-071-38/+31
|
* Tidy up attribute completion matchLukas Wirth2021-01-071-19/+11
|
* Change <|> to $0 - RebaseKevaundray Wedderburn2021-01-0722-312/+304
|
* Align config's API with usageAleksey Kladov2021-01-0611-68/+49
| | | | The config now is mostly immutable, optimize for that.
* YAGNI active_resolve_capabilitiesAleksey Kladov2021-01-063-29/+3
| | | | | | | | | This leaks a lot of LSP details into ide layer, which we want to avoid: https://github.com/rust-analyzer/rust-analyzer/tree/c9cec381bcfd97e5f3536e31a9c546ab5c0665e6/docs/dev#lsp-independence Additionally, all what this infra does is providing a toggle for auto-import completion, but we already have one!
* Change the should_panic completion and his related attribute testFlowerBOII2021-01-061-7/+3
|
* Remove the args for the must_use attibute and change the related testsFlowerBOII2021-01-061-3/+3
|
* Update deprecated testFlowerBOII2021-01-061-3/+3
|
* Remove a part of the deprecated autocompletionFlowerBOII2021-01-061-1/+1
|
* Merge #7168bors[bot]2021-01-051-1/+1
|\ | | | | | | | | | | | | | | | | 7168: Rename expr -> tail_expr r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Rename expr -> tail_exprAleksey Kladov2021-01-051-1/+1
| |
* | Small helpersKirill Bulatov2021-01-041-1/+1
| |
* | Code review fixesKirill Bulatov2021-01-041-9/+2
| |
* | Ignore associated items during unqialified path fuzzy completionsKirill Bulatov2021-01-041-1/+9
|/
* Handle case where detail doesn't exist without giving up on completionNick Spain2021-01-021-1/+1
| | | Co-authored-by: Aleksey Kladov <[email protected]>
* Remove source_old from adding const and function implsNick Spain2021-01-021-23/+26
|
* Make the result of Const, FunctionRender and TypeAliasRender constructors ↵Nick Spain2021-01-025-20/+17
| | | | | | optional They use source() which now returns an Option so they need to too.
* HasSource::source_old -> HasSource::source for places where proc-macros were ↵Nick Spain2021-01-021-12/+4
| | | | | | | | | | | | special cased In #6901 some special case handling for proc-macros was introduced to prevent panicing as they have no AST. Now the new HasSource::source method is used that returns an option. Generally this was a pretty trivial change, the only thing of much interest is that `hir::MacroDef` now implements `TryToNav` not `ToNav` as this allows us to handle `HasSource::source` now returning an option.
* Mark HasSource::source_old as deprecated but allow at all call sitesNick Spain2021-01-025-0/+6
|
* HasSource::source -> HasSource::source_oldNick Spain2021-01-025-6/+6
| | | | To start migrating HasSource::source to return an Option.
* Merge #7102bors[bot]2021-01-011-2/+66
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 7102: Fix completion of Default struct update syntax r=Veykril a=nick96 Previously the inserted text was always `..Default::default()` which ends up as `...Default::default()` if `.` was typed. Now checks if the current token is `.` and inserts `.Default::default()` if it is, so `..Default::default()` is correctly completed. I think there's probably a better way to implement this context aware completion because I've seen it in other parts of rust-analyzer as a user but I'm not sure how to do it. Fixes #6969 Co-authored-by: Nick Spain <[email protected]>
| * Strip completion prefix of what has already been typedNick Spain2021-01-011-5/+4
| | | | | | | | | | Per Veykril's suggestion, this removes the need to repeat the completion text twice. It also handles the completion in a more general case.
| * Add a test for correct completion of ..Default::default()Nick Spain2021-01-011-1/+61
| |
| * Fix completion of Default struct update syntaxNick Spain2020-12-311-1/+6
| | | | | | | | | | | | | | | | Previously the inserted text was always `..Default::default()` which ends up as `...Default::default()` if `.` was typed. Now checks if the current token is `.` and inserts `.Default::default()` if it is, so `..Default::default()` is correctly completed. Fixes #6969
* | Remove some unneeded string allocationsLukas Wirth2020-12-311-1/+1
|/
* Avoid a couple of allocationsLaurențiu Nicola2020-12-292-3/+3
|
* Merge #7064bors[bot]2020-12-291-3/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7064: Ignore qualifiers when doing autoimport completions lookup r=lnicola a=SomeoneToIgnore A follow-up of https://github.com/rust-analyzer/rust-analyzer/pull/6918#issuecomment-748511151 and the PR itself. Tweaks the `import_map` query api to be more flexible with the ways to match against the import path and now fuzzy imports search in names only. This had improved the completion speed for me locally in ~5 times for `fuzzy_completion` span time, but please recheck me here. IMO we're fast and presice enough now, so I've added the modules back to the fuzzy search output. Also tweaks the the expect tests to display functions explicitly, to avoid confusing "duplicate" results. Co-authored-by: Kirill Bulatov <[email protected]>
| * Tweak the fuzzy search limitsKirill Bulatov2020-12-281-1/+6
| |
| * Add docs and optimisationsKirill Bulatov2020-12-281-2/+2
| |
| * Better query api and fuzzy searchKirill Bulatov2020-12-281-1/+1
| |
| * Draft the module exclusion in modulesKirill Bulatov2020-12-281-1/+1
| |
* | Merge #7076bors[bot]2020-12-291-1/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | 7076: Properly parse path separators in format-like postfix r=Veykril a=Veykril Co-authored-by: Lukas Wirth <[email protected]>