aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db
Commit message (Collapse)AuthorAgeFilesLines
* Do not merge imports with different attributesJesse Bakker2020-12-182-1/+28
|
* Rename ImplDef -> ImplAleksey Kladov2020-12-172-3/+3
| | | | | | We used to have `Def` suffix for all symbols, but we moved off from that. `FunctionDef` isn't better than `Function`. Looks like we've forgot to change `Impl` though!
* Merge #6907bors[bot]2020-12-173-18/+107
|\ | | | | | | | | | | | | | | | | | | 6907: Lifetime reference search r=matklad a=Veykril PR #6787 but rewritten to make use of the HIR now. This only applies to Lifetimes, not labels. Also Higher-Ranked Trait Bounds aren't supported yet, but I feel like this PR is big enough as is which is why I left them out after noticing I forgot about them. Supporting renaming required slight changes in the renaming module as lifetime names aren't allowed for anything but lifetimes(and labels) and vice versa for normal names. Co-authored-by: Lukas Wirth <[email protected]>
| * Lifetime reference searchLukas Wirth2020-12-163-18/+107
| |
* | Remove `module_lang_items`Jonas Schievink2020-12-161-1/+0
|/ | | | | It isn't used anywhere except in `crate_lang_items`. Remove it to slightly reduce memory usage and simplify the code.
* Move to upstream `macro_rules!` modelJonas Schievink2020-12-152-8/+2
|
* Add find usages for enum constructorsDaiki Ihara2020-12-141-0/+15
|
* Normalize spelling to American EnglishAleksey Kladov2020-12-102-18/+18
|
* Introduce anchored_pathAleksey Kladov2020-12-092-7/+7
| | | | | They allow to represent paths like `#[path = "C:\path.rs"] mod foo;` in a lossless cross-platform & network-transparent way.
* Merge #6750bors[bot]2020-12-081-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | 6750: Remove documentation query, move doc handling to attributes r=matklad a=Veykril Fixes #3182 Removes the documentation query in favor of `Attrs::docs`. Attrs already handlded doc comments partially but the alloc saving check was wrong so it only worked when other attributes existed as well. Unfortunately the `new` constructor has to do an intermediate allocation now because we need to keep the order of mixed doc attributes and doc comments. I've also partially adjusted the `hover` module to have its tests check the changes, it still has some `HasSource` trait usage due to the `ShortLabel` trait usage, as that is only implemented on the Ast parts and not the Hir, should this ideally be implemented for the Hir types as well?(would be a follow up PR of course) Co-authored-by: Lukas Wirth <[email protected]>
| * Remove documentation queryLukas Wirth2020-12-071-1/+0
| |
* | Tweak the search query params for better lookup speedKirill Bulatov2020-12-081-1/+9
| |
* | Disable the completion for no corresponding client resolve capabilitiesKirill Bulatov2020-12-071-12/+2
| |
* | Remove the stateKirill Bulatov2020-12-071-31/+1
| |
* | Make completion resolve asyncKirill Bulatov2020-12-071-1/+31
|/
* Add slightly more profiling detailsJonas Schievink2020-12-041-1/+1
|
* Extract tests module to file in ide_db crateDaiki Ihara2020-12-038-1441/+1419
|
* Fix use merging not using the first path segmentLukas Wirth2020-11-301-1/+10
|
* Support self in reference searchLukas Wirth2020-11-291-0/+1
|
* Move the helpers into ide_dbKirill Bulatov2020-11-284-1/+1410
|
* Merge #6614 #6632bors[bot]2020-11-261-1/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6614: Improve autoimports on completion speed r=matklad a=SomeoneToIgnore Presumably closes https://github.com/rust-analyzer/rust-analyzer/issues/6594 May help https://github.com/rust-analyzer/rust-analyzer/issues/6612 * Ignore modules eaferly * Do less completion string rendering 6632: Pin cargo_metadata r=matklad a=kjeremy See: https://github.com/oli-obk/cargo_metadata/pull/142#issuecomment-733653275 Co-authored-by: Kirill Bulatov <[email protected]> Co-authored-by: kjeremy <[email protected]>
| * Improve autoimports on completion speedKirill Bulatov2020-11-241-1/+8
| | | | | | | | | | * Ignore modules eaferly * Do less completion string rendering
* | Rename `parse_macro` to `parse_macro_expansion`Jonas Schievink2020-11-242-3/+3
|/ | | | This does not parse macros, it expands a macro and parses the *result*
* Remove query aliasesKirill Bulatov2020-11-161-8/+8
|
* Tweak the search limits a bitKirill Bulatov2020-11-161-2/+3
|
* Use imports_locatorKirill Bulatov2020-11-161-18/+47
|
* Add imports in auto completionKirill Bulatov2020-11-161-5/+9
|
* Use shorthand field syntax in destructuresLukas Wirth2020-11-141-10/+22
|
* Use shorthand record syntax when renaming struct initializer fieldLukas Wirth2020-11-141-6/+10
|
*-. Merge #6331 #6342bors[bot]2020-10-245-0/+1050
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6331: correct hover text for items with doc attribute with raw strings r=matklad a=JoshMcguigan Fixes #6300 by improving the handling of raw string literals in attribute style doc comments. This still has a bug where it could consume too many `"` at the start or end of the comment text, just as the original code had. Not sure if we want to fix that as part of this PR or not? If so, I think I'd prefer to add a unit test for either the `as_simple_key_value` function (I'm not exactly sure where this would belong / how to set this up) or create a `fn(&SmolStr) -> &SmolStr` to unit test by factoring out the `trim` operations from `as_simple_key_value`. Thoughts on this? 6342: Shorter dependency chain r=matklad a=popzxc Continuing implementing suggestions from the `Completion refactoring` zulip thread. This PR does the following: - Removes dependency of `completions` on `assists` by moving required functionality into `ide_db`. - Moves completely `call_info` crate into `ide_db` as it looks like it fits perfect there. - Adds a bunch of new tests and docs. - Adds the re-export of `base_db` to the `ide_db` and removes direct dependency on `base_db` from other crates. The last point is controversial, I guess, but I noticed that in places where `ide_db` is used, `base_db` is also *always* used. Thus I think the dependency on the `base_db` is implied by the fact of `ide_db` interfaces, and thus it makes sense to just provide `base_db` out of the box. Co-authored-by: Josh Mcguigan <[email protected]> Co-authored-by: Igor Aleksanov <[email protected]>
| | * Re-export base_db from ide_dbIgor Aleksanov2020-10-241-0/+3
| | |
| | * Add tests for traits functions in ide_dbIgor Aleksanov2020-10-241-0/+149
| | |
| | * Make call_info a part of ide_dbIgor Aleksanov2020-10-243-0/+760
| | |
| | * Remove dependency on 'assists' from 'completion' crateIgor Aleksanov2020-10-243-0/+138
| |/
* / Bump depsLaurențiu Nicola2020-10-241-1/+1
|/
* Clarify the names one more timeAleksey Kladov2020-10-153-9/+18
|
* More idiomatic classification APIAleksey Kladov2020-10-153-174/+174
|
* More clarificationsAleksey Kladov2020-10-152-12/+12
|
* Unconfuse expression and pattern field init shorthandsAleksey Kladov2020-10-152-7/+11
|
* Clarify NameClass names a bitAleksey Kladov2020-10-152-3/+3
|
* Treat `ast::Name` in field patterns as useJonas Schievink2020-10-091-43/+73
|
* Move ide::AnalysisChange -> base_db::ChangeAleksey Kladov2020-10-022-73/+7
| | | | | | This seems like a better factoring logically; ideally, clients shouldn't touch `set_` methods of the database directly. Additionally, I think this should remove the unfortunate duplication in fixture code.
* Remove periodic gc stubAleksey Kladov2020-09-293-46/+3
|
* Rename record_field_pat to record_pat_fieldPavan Kumar Sunkara2020-09-101-5/+5
|
* Add description for crates that will be publishedPavan Kumar Sunkara2020-08-241-0/+1
|
* Add version to deps in cargo.tomlPavan Kumar Sunkara2020-08-241-7/+7
|
* Optimize reference searchAleksey Kladov2020-08-191-25/+38
|
* **Remove Unused Parameter** refactoringAleksey Kladov2020-08-191-1/+1
|
* Future proof find-usages APIAleksey Kladov2020-08-191-13/+35
| | | | | | We might want to provide more efficient impls for check if usages exist, limiting the search, filtering and cancellation, so let's violate YAGNI a bit here.
* Introduce LabelAleksey Kladov2020-08-182-0/+50
|