about summary refs log tree commit diff
path: root/crates/ide/src/hover.rs
AgeCommit message (Collapse)AuthorLines
2021-08-21Show try operator propogated types on ranged hoverLukas Wirth-11/+198
2021-08-16SimplifyLukas Wirth-3/+5
2021-08-12Merge #9807bors[bot]-3/+25
9807: Implicit `Sized` bounds r=iDawer a=iDawer This should close #8984 `hir_ty`: - Type parameters, associated types and `impl Trait` are `Sized` by deafault except `Self` in a trait. - Implicit `Sized` bound is added to end of predicate list. It does not check if such bound is present already. Also it does not track the bound is implicit. - Allowed ambiguous unsize coercion if Chalk returns definite guidance. - Allowed ambiguous autoderef if Chalk returns definite guidance. `hir_def`: - `ItemTree` pretty printing shows `?Sized` bounds. `HirDisplay`: - `impl Trait` with weird bounds rendered correctly. - `Sized`/`?Sized` bounds are not shown if they are default. ### Perf `./target/rust-analyzer-baseline_8a843113 -q analysis-stats --memory-usage .` ``` Database loaded: 1.63s, 287minstr, 91mb crates: 38, mods: 741, decls: 15914, fns: 11835 Item Collection: 26.80s, 73ginstr, 338mb exprs: 318994, ??ty: 398 (0%), ?ty: 435 (0%), !ty: 174 Inference: 50.28s, 116ginstr, 516mb Total: 77.08s, 189ginstr, 855mb ``` `./target/rust-analyzer-sized-fixed_ambig_coercion-de074fe6 -q analysis-stats --memory-usage .` ``` Database loaded: 1.63s, 287minstr, 91mb crates: 38, mods: 741, decls: 15914, fns: 11835 Item Collection: 26.95s, 73ginstr, 338mb exprs: 318994, ??ty: 398 (0%), ?ty: 435 (0%), !ty: 166 Inference: 96.39s, 234ginstr, 543mb Total: 123.33s, 307ginstr, 881mb ``` Co-authored-by: Dawer <7803845+iDawer@users.noreply.github.com>
2021-08-11Show type actions on ranged type hoverLukas Wirth-57/+127
2021-08-10impl gen hash for structsYoshua Wuyts-2/+2
2021-08-08Use minicoreYoshua Wuyts-2/+2
2021-08-04Fix tests.Dawer-3/+25
2021-08-03Give TypeInfo fields and methods more appropriate namesLukas Wirth-11/+11
2021-08-03Introduce TypeInfoLukas Wirth-11/+7
2021-08-02Merge #9762bors[bot]-5/+13
9762: fix: Fix ranged hover result range r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-02Fix ranged hover result rangeLukas Wirth-5/+13
2021-08-02Merge #9761bors[bot]-72/+150
9761: feat: Show coerced types on type hover r=Veykril a=Veykril This applies to both the ranged hover request as well as the normal hover type fallback. ![image](https://user-images.githubusercontent.com/3757771/127883884-2935b624-a3e5-4f35-861a-7d6d3266d187.png) ![image](https://user-images.githubusercontent.com/3757771/127883951-4ff96b6b-7576-4886-887b-1198c1121841.png) We unfortunately have to leave out syntax highlighting here as otherwise the `Type` and `Coerced` words in the hover will get colored. Note that this does not show all the coercions yet(and almost no pattern coercions) as not all coercion adjustments are implemented yet. Closes https://github.com/rust-analyzer/rust-analyzer/issues/2677 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-02Also search for pattern nodes in ranged hoverLukas Wirth-10/+41
2021-08-02Show coerced types on type hoverLukas Wirth-66/+113
2021-08-02resolve_doc_path is able to resolve to macrosLukas Wirth-1/+4
2021-07-31Fix hover range for derive inputsLukas Wirth-2/+3
2021-07-28fix: Revert removing [] from the hover gifAlexander González-1/+1
2021-07-27refactor: Apply PR suggestionsAlexander Gonzalez-47/+40
2021-07-27chore: Remove unnecessary println! callAlexander Gonzalez-1/+0
2021-07-27test: Add tests for when hovering failsAlexander Gonzalez-6/+68
2021-07-27docs: Improve the comments in crates/ide/src/hover.rsAlexander Gonzalez-8/+14
2021-07-27test: Add hover_range testsAlexander Gonzalez-0/+106
2021-07-27feat: Add the hover_range capabilityAlexander Gonzalez-3/+25
2021-07-27feat: Extend the server with the hover_range capabilityAlexander Gonzalez-0/+7
2021-07-26SimplifyLukas Wirth-6/+2
2021-07-24Resolve derive attribute input macro paths in ide layerLukas Wirth-5/+52
2021-07-23Correctly classify Rename NamesLukas Wirth-0/+59
2021-07-20Move doc_links tests from hover to doc_linksLukas Wirth-383/+0
2021-07-20Some more fragment fixesLukas Wirth-1/+1
2021-07-20Correctly generate link fragments for associated itemsLukas Wirth-6/+6
2021-07-19Resolve paths to assoc items for traitsLukas Wirth-0/+1
2021-07-11Inline name classification reference callsLukas Wirth-5/+14
2021-07-11Explicitly check for reference locals or fields in Name classificationLukas Wirth-7/+3
2021-07-11internal: remove one more needless extern crateAleksey Kladov-2/+2
2021-07-11internal: remove unused paramAleksey Kladov-2/+2
2021-07-11Merge #9449bors[bot]-0/+2
9449: feat: Emit test names in `Run test` runnables if they come from a macro expansion r=matklad a=Veykril Fixes #8964 Before: ![Code_D1Tu5Iuh5I](https://user-images.githubusercontent.com/3757771/124174685-f552b380-daac-11eb-9086-c97db014b77c.png) After: ![image](https://user-images.githubusercontent.com/3757771/124174493-bb81ad00-daac-11eb-96c7-3de6545a62e1.png) Basically when a macro emits more than one test we name the test functions/modules name in the runnable instead to not emit a bunch of equally named `Run Test` annotations which don't really tell much. Note that the `Run fibonacci_test Tests` line is below the attributes due to the fact that the function name span is being reused for the generated module in rstest's expansion. Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-09Emit test name in Run test runnables if it comes from a macro expansionLukas Wirth-0/+2
2021-07-06internal: ensure consistent passing for config paramsAleksey Kladov-10/+10
We pass "context" parametes first, so configs should be on the left. "Bigger" context wins, so configs goes after db.
2021-07-02Add cov_markLukas Wirth-0/+1
2021-07-02Fix incorrect guard for NameRefClass attribute resolutionLukas Wirth-0/+20
2021-07-01Merge #9451bors[bot]-0/+1
9451: minor: Add `goto_type_action` for field hovers r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-01Add `goto_type_action` for field hoversLukas Wirth-0/+1
2021-06-30Don't add test runnables for outline modules in the wrong fileLukas Wirth-0/+1
2021-06-28Fix `NameRef::classify` path resolution inside attributesLukas Wirth-11/+12
2021-06-22Factor out `pick_best_token` ide pattern into `ide_db`Lukas Wirth-19/+8
2021-06-21Collapse documentation and markdown config settings into an enumLukas Wirth-24/+46
2021-06-21Split hover actions config into its own config structLukas Wirth-56/+55
2021-06-21Merge #9264bors[bot]-95/+90
9264: feat: Make documentation on hover configurable r=Veykril a=Veykril This also implements deprecation support for config options as this renames `hoverActions_linksInHover` to `hover_linksInHover`. Fixes #9232 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-20Merge #9328bors[bot]-1/+1
9328: internal: Update deps r=lnicola a=kjeremy Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-06-18internal: use minicore deref moreAleksey Kladov-2/+2