about summary refs log tree commit diff
path: root/crates/ide/src/hover.rs
AgeCommit message (Collapse)AuthorLines
2022-07-17feat: support negative const generic parametersArtur Sinila-20/+10
* feat: support `bool` & `char` const generics
2022-06-10internal: Bump DependenciesLukas Wirth-2/+2
2022-05-23fix: When hovering macro inputs, don't show everything that was downmappedLukas Wirth-1/+1
2022-04-07minor: Remove pointless rebindingsLukas Wirth-1/+1
2022-03-31internal: Enforce Resolver to always have a module scopeLukas Wirth-1/+1
2022-03-12fix clippy::needless_borrowMatthias Krüger-1/+1
2022-03-06internal: Re-arrange ide_db modulesLukas Wirth-1/+2
2022-03-05fix: Recognize `Self` as a proper keywordLukas Wirth-1/+1
2022-02-15fix: keyword hover works on non-keyword tokens if expanded to keywordLukas Wirth-7/+10
2022-01-31Make more precise range macro upmappingLukas Wirth-4/+9
2022-01-04Remove lossy `Definition::from_token`/`Definition::from_node` methodsLukas Wirth-3/+3
2021-12-17fix: Don't duplicate attribute completionsLukas Wirth-3/+4
2021-12-10Don't show trait flyimports for impl trait and placeholdersLukas Wirth-1/+1
2021-11-22Add to macro testing infra to emit token map idsLukas Wirth-1/+0
2021-11-22Unnest ide::display::navigation_target moduleLukas Wirth-2/+1
2021-11-19ide: dedupe or merge hover actionsJake Heinz-4/+48
2021-11-18ide: show go to for function hover return typeJake Heinz-0/+1
2021-11-11internal: Flatten `Definition::ModuleDef` variantLukas Wirth-27/+18
2021-10-16more clippy fixesMilo-5/+5
2021-10-12Saw a FIXME comment and decided to fix it.Mirko Rainer-1/+1
This renames `descend_into_macros` to `descend_into_macros_single` and `descend_into_macros_many` into `descend_into_macros`. However, this does not touch a function in `SemanticsImpl` of same name.
2021-09-23Split the hover module upLukas Wirth-4694/+70
2021-09-23Support goto_def for intra-doc-links in macro invocationsLukas Wirth-57/+8
2021-09-23Make hover work for intra doc links in macro invocationsLukas Wirth-20/+100
2021-09-23CleanupLukas Wirth-121/+67
2021-09-22move function to defs.rshamidreza kalbasi-72/+19
2021-09-22use find_definition in go tohamidreza kalbasi-27/+44
2021-09-21fix derive hover in macrohamidreza kalbasi-14/+55
2021-09-19internal: definition based hover functionshamidreza kalbasi-92/+123
2021-09-15Merge #10233bors[bot]-21/+175
10233: fix: add multi-token mapping support to hovers r=Veykril a=spookyvision implement #10070 in [`hover`](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/hover.rs) Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
2021-09-15add multi-token mappings for hoverAnatol Ulrich-6/+2
2021-09-15# This is a combination of 3 commits.Anatol Ulrich-19/+177
# This is the 1st commit message: add multi-token mappings for hover # The commit message #2 will be skipped: # make fallback an Option instead of vec # The commit message #3 will be skipped: # fix indentation
2021-09-14Merge #10232bors[bot]-0/+22
10232: internal: Add more tests for ide functionality in attributed items r=Veykril a=Veykril cc https://github.com/rust-analyzer/rust-analyzer/issues/9868 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-09-14Add some more attribute ide testsLukas Wirth-0/+22
2021-09-14Merge #10204bors[bot]-0/+136
10204: feat: Show the type of what is being dereferenced in a deref expression. r=theo-lw a=theo-lw Addresses issue #10106. In-progress - I'm trying to figure out why `hover_deref_expr_with_coercion` is failing. Co-authored-by: Teddy_Wang <wangtheo662@gmail.com>
2021-09-13Improve hover over derference messageTeddy_Wang-11/+11
2021-09-13Fix hover testsTeddy_Wang-3/+3
2021-09-13Fix spellingTeddy_Wang-6/+6
2021-09-12Merge #10202bors[bot]-9/+166
10202: fix: Type param hover shows correct sized bounds. r=flodiebold a=iDawer Closes #9949 This adds implicit `: Sized` bound to type parameters at lowering step. Hovering on type parameter does not show it's `: Sized` bound be it set explicitly or implicitly. This is because it doesn't track that the bound was set implicitly. ### Perf ```rust ./target/rust-analyzer-baseline-3dae94bf -q analysis-stats --memory-usage . Database loaded: 4.51s, 311minstr, 110mb (metadata 1.08s, 22minstr, 743kb; build 3.20s, 8730kinstr, -237kb) crates: 38, mods: 770, decls: 17173, fns: 12835 Item Collection: 29.63s, 85ginstr, 372mb exprs: 353460, ??ty: 364 (0%), ?ty: 232 (0%), !ty: 144 Inference: 118.25s, 284ginstr, 601mb Total: 147.88s, 370ginstr, 973mb ./target/rust-analyzer-hover-ty-param-dfb15292 -q analysis-stats --memory-usage . Database loaded: 4.53s, 311minstr, 110mb (metadata 1.10s, 22minstr, 743kb; build 3.20s, 8672kinstr, -189kb) crates: 38, mods: 770, decls: 17173, fns: 12835 Item Collection: 29.59s, 85ginstr, 372mb exprs: 353460, ??ty: 364 (0%), ?ty: 232 (0%), !ty: 144 Inference: 121.69s, 296ginstr, 601mb Total: 151.28s, 382ginstr, 974mb ``` Co-authored-by: Dawer <7803845+iDawer@users.noreply.github.com>
2021-09-11Fix tests by importing core::ops::DerefTeddy_Wang-10/+18
2021-09-10minor: fix tests.Dawer-0/+2
2021-09-10fix: Type param hover shows correct sized bounds.Dawer-0/+140
2021-09-10internal: add implicit `: Sized` bound to type parameters.Dawer-9/+24
2021-09-09Add tests. The tests with coercion fail, but I have no clue why.Teddy_Wang-0/+64
2021-09-08Show the type of what is being dereferenced in a deref expressionTeddy_Wang-0/+64
2021-09-07fix `super` path wrong displayDezhi Wu-1/+23
2021-09-07cargo fmtDezhi Wu-3/+6
2021-09-07fix: path display error when start with `crate`Dezhi Wu-0/+19
2021-09-01Merge #9954bors[bot]-13/+202
9954: feat: Show try operator propogated types on ranged hover r=matklad a=Veykril Basically this just shows the type of the inner expression of the `?` expression as well as the type of the expression that the `?` returns from: ![Code_wIrCxMqLH9](https://user-images.githubusercontent.com/3757771/130111025-f7ee0742-214a-493b-947a-b4a671e4be92.png) Unless both of these types are `core::result::Result` in which case we show the error types only. ![Code_Xruw5FCBNI](https://user-images.githubusercontent.com/3757771/130111024-f9caef82-92e4-4070-b3dd-f2ff9e5d87a9.png) If both types are `core::option::Option` with different type params we do not show this special hover either as it would be pointless(instead fallback to default type hover) Very much open to changes to the hover text here(I suppose we also want to show the actual type of the `?` expression, that is its output type?). Fixes #9931 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-09-01Minor fixesLukas Wirth-6/+8
2021-08-22Refactor & improve handling of overloaded binary operatorsFlorian Diebold-2/+2
Fixes #9971. Also records them as method resolutions, which we could use later.