aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src
Commit message (Collapse)AuthorAgeFilesLines
* Add more profiling for flyimportsKirill Bulatov2021-06-101-0/+2
|
* Don't classify attributes on macro-calls are the macro itselfLukas Wirth2021-06-091-5/+3
|
* Fix edge case for ImportGranularity guessingLukas Wirth2021-06-082-7/+26
|
* Reorder CompletionContext fieldsLukas Wirth2021-06-071-2/+1
|
* Unescape generated clippy lintsLukas Wirth2021-06-051-314/+726
|
* Replace `-` with `_` in generated lint namesLukas Wirth2021-06-041-137/+135
|
* Generate default lint groupsLukas Wirth2021-06-041-0/+29
|
* Generate default lint completionsLukas Wirth2021-06-042-0/+6892
|
* Make it opt-inJonas Schievink2021-06-031-0/+1
|
* Implement per-edition preludesJonas Schievink2021-06-011-10/+12
|
* Merge #8866bors[bot]2021-05-312-18/+4
|\ | | | | | | | | | | | | | | 8866: Update salsa r=matklad a=jonas-schievink This updates salsa to include https://github.com/salsa-rs/salsa/pull/265, and removes all cancellation-related code from rust-analyzer Co-authored-by: Jonas Schievink <[email protected]>
| * Update salsaJonas Schievink2021-05-272-18/+4
| |
* | simplifyLukas Wirth2021-05-282-10/+2
|/
* Exclude inherent traits more eagerlyKirill Bulatov2021-05-271-11/+8
|
* Merge #8945bors[bot]2021-05-232-1/+19
|\ | | | | | | | | | | | | | | | | | | | | | | 8945: fix: Make expected type work in more situations r=flodiebold a=flodiebold Also makes call info show the correct types for generic methods. ![2021-05-23-182952_1134x616_scrot](https://user-images.githubusercontent.com/906069/119269023-dd5a5b00-bbf5-11eb-993a-b6e122c3b9a6.png) ![2021-05-23-183117_922x696_scrot](https://user-images.githubusercontent.com/906069/119269025-dfbcb500-bbf5-11eb-983c-fc415b8428e0.png) Co-authored-by: Florian Diebold <[email protected]>
| * Get rid of field_type againFlorian Diebold2021-05-231-1/+1
| |
| * Record method call substs and use them in call infoFlorian Diebold2021-05-231-0/+18
| |
* | minor: align import style with styleguideAleksey Kladov2021-05-231-3/+3
|/
* Don't compare ast::Visibility by stringifyingLukas Tobias Wirth2021-05-201-6/+9
|
* Merge #8873bors[bot]2021-05-203-15/+237
|\ | | | | | | | | | | | | | | | | | | | | | | 8873: Implement import-granularity guessing r=matklad a=Veykril This renames our `MergeBehavior` to `ImportGranularity` as rustfmt has it as the purpose of them are basically the same. `ImportGranularity::Preserve` currently has no specific purpose for us as we don't have an organize imports assist yet, so it currently acts the same as `ImportGranularity::Item`. We now try to guess the import style on a per file basis and fall back to the user granularity setting if the file has no specific style yet or where it is ambiguous. This can be turned off by setting `import.enforceGranularity` to `true`. Closes https://github.com/rust-analyzer/rust-analyzer/issues/8870 Co-authored-by: Lukas Tobias Wirth <[email protected]>
| * Check for differing attributes in granularity guessingLukas Tobias Wirth2021-05-203-7/+21
| |
| * Replace ImportGranularity::Guess with guessing boolean flagLukas Tobias Wirth2021-05-193-21/+183
| |
| * Add ImportGranularity::GuessLukas Tobias Wirth2021-05-181-12/+4
| |
| * Implement import-granularity guessingLukas Tobias Wirth2021-05-181-2/+33
| |
| * MergeBehavior -> ImportGranularityLukas Tobias Wirth2021-05-182-10/+33
| |
* | Simplify eager macro representationJonas Schievink2021-05-191-1/+0
| |
* | Add new LSP extension for workspace symbol lookupalcroito2021-05-171-0/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new extension allows filtering of workspace symbool lookup results by search scope or search kind. Filtering can be configured in 3 different ways: - The '#' or '*' markers can be added inline with the symbol lookup query. The '#' marker means symbols should be looked up in the current workspace and any dependencies. If not specified, only current workspace is considered. The '*' marker means all kinds of symbols should be looked up (types, functions, etc). If not specified, only type symbols are returned. - Each LSP request can take an optional search_scope or search_kind argument query parameter. - Finally there are 2 global config options that can be set for all requests served by the active RA instance. Add support for setting the global config options to the VSCode extension. The extension does not use the per-request way, but it's useful for other IDEs. The latest version of VSCode filters out the inline markers, so currently the only reasonable way to use the new functionality is via the global config.
* internal: remove SyntaxRewriterAleksey Kladov2021-05-141-1/+3
|
* internal: remove one more immutable treeAleksey Kladov2021-05-141-14/+20
|
* Give MergeBehaviour variants better namesLukas Wirth2021-05-102-45/+53
|
* internal: introduce `ast::make::ext` module with common shortcutsAleksey Kladov2021-05-092-4/+4
| | | | | | | | | | There's a tension between keeping a well-architectured minimal orthogonal set of constructs, and providing convenience functions. Relieve this pressure by introducing an dedicated module for non-orthogonal shortcuts. This is inspired by the django.shortcuts module which serves a similar purpose architecturally.
* Don't handle Self as a usage for TraitDefsLukas Wirth2021-05-081-1/+0
|
* Fix builtintype def_to_tyLukas Wirth2021-05-081-8/+14
|
* Correctly support SelfType when searching for usagesLukas Wirth2021-05-081-70/+102
|
* internal: use API stabilized in 1.52Aleksey Kladov2021-05-061-4/+3
|
* Split out merge_imports module from helpers::insert_useLukas Wirth2021-04-243-318/+318
|
* Merge #8591 #8638bors[bot]2021-04-232-179/+142
|\ | | | | | | | | | | | | | | | | | | | | | | 8591: Remove SyntaxRewriter usage in insert_use in favor of mutable syntax trees r=matklad a=Veykril Unfortunately changing `insert_use` to not use `SyntaxRewriter` creates a lot of changes since so much relies on that. But on the other hand this should be the biggest usage of `SyntaxRewriter` I believe. 8638: Remove SyntaxRewriter::from_fn r=Veykril a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
* \ Merge #8317bors[bot]2021-04-231-7/+51
|\ \ | | | | | | | | | | | | | | | | | | | | | 8317: Convert tuple struct to named struct assist r=Veykril a=unexge Closes https://github.com/rust-analyzer/rust-analyzer/issues/8192 Co-authored-by: unexge <[email protected]>
| * | Use multiple loops instead of `Iterator::chain` in `FindUsages`unexge2021-04-211-13/+22
| | |
| * | Add convert tuple struct to named struct assistunexge2021-04-041-9/+9
| | |
| * | Allow including `Self` kw references to `FindUsages`unexge2021-04-041-4/+39
| | |
| | * Add cov_marks to insert_use testsLukas Wirth2021-04-202-1/+39
| | |
| | * Remove SyntaxRewriter usage in insert_use in favor of tedLukas Wirth2021-04-202-178/+103
| |/ |/|
* | Check for rust doc code attributes like rustdoc doesLukas Wirth2021-04-192-0/+35
| |
* | Merge #8467bors[bot]2021-04-192-0/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8467: Adds impl Deref assist r=jhgg a=jhgg This PR adds a new `generate_deref` assist that automatically generates a deref impl for a given struct field. Check out this gif: ![2021-04-11_00-33-33](https://user-images.githubusercontent.com/5489149/114296006-b38e1000-9a5d-11eb-9112-807c01b8fd0a.gif) -- I have a few Q's: - [x] Should I write more tests, if so, what precisely should I test for? - [x] I have an inline question on line 65, can someone provide guidance? :) - [x] I can implement this for `ast::TupleField` too. But should it be a separate assist fn, or should I try and jam both into the `generate_deref`? - [x] I want to follow this up with an assist on `impl $0Deref for T {` which would automatically generate a `DerefMut` impl that mirrors the Deref as well, however, I could probably use some pointers on how to do that, since I'll have to reach into the ast of `fn deref` to grab the field that it's referencing for the `DerefMut` impl. Co-authored-by: jake <[email protected]>
| * | Adds impl Deref assistjake2021-04-112-0/+12
| | |
* | | Merge #8546bors[bot]2021-04-162-2/+35
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8546: Return CallInfo for unclosed call expressions r=Veykril a=Veykril Closes #8522 bors r+ Co-authored-by: Lukas Wirth <[email protected]>
| * | | Return CallInfo for unclosed call expressionsLukas Wirth2021-04-162-2/+35
| | | |
* | | | Exclude inherent traits from flyimportsKirill Bulatov2021-04-161-6/+16
|/ / /
* / / Profile trait solving for all invocationsKirill Bulatov2021-04-141-1/+1
|/ /