Lukas Wirth
a39c0493a1
Render literal escaping errors in hovers
2024-05-13 12:51:57 +02:00
Lukas Wirth
253929f6ae
Fix literal hovers being confusing and wrong for floats
2024-05-13 12:26:45 +02:00
bors
65eda41e65
Auto merge of #17021 - roife:add-hover-limits-for-adts, r=Veykril
...
Support hovering limits for adts
Fix #17009
1. Currently, r-a supports limiting the number of struct fields displayed when hovering. This PR extends it to support enum variants and union fields. Since the display of these three (ADTs) is similar, this PR extends 'hover_show_structFields' to 'hover_show_adtFieldsOrVariants'.
2. This PR also resolved the problem that the layout of ADT was not restricted by display limitations when hovering on the Self type.
3. Additionally, this PR changes the default value of display limitations to `10` (instead of the original `null`), which helps users discover this feature.
2024-04-25 07:23:27 +00:00
roife
43576989a1
Add hovering limitations support for variants
2024-04-20 09:14:00 +08:00
roife
e0e28ec856
fix: add a separate setting for enum variants
2024-04-19 21:45:56 +08:00
Lukas Wirth
6bfdd38c69
Render matched macro arm on hover of macro calls
2024-04-18 10:51:58 +02:00
roife
c06d670f8f
fix: the fields or variants of ADT was not restricted by limitations when hovering on Self type
2024-04-16 16:27:57 +08:00
roife
21da6c6164
Add config hover_show_adtFieldsOrVariants to handle hovering limitation for ADTs
2024-04-16 16:26:23 +08:00
bors
3691380c35
Auto merge of #16920 - Veykril:clippy-lints, r=Veykril
...
internal: Fix new nightly clippy lints
2024-04-01 16:00:18 +00:00
Lukas Wirth
2ae3e57c26
Fix new clippy lints
2024-04-01 17:55:56 +02:00
Young-Flash
1c85234bcd
limit struct field hover display nums
2024-03-25 19:55:19 +08:00
Wilfred Hughes
30d3d68044
Fix unwanted leading whitespace in hover text
...
PR #16366 moved layout information to a separate line, so the
leading whitespace is no longer necessary.
2024-03-12 12:27:57 -07:00
Lukas Wirth
b20e467373
internal: Adjust a few things for trait assoc item hovers
2024-03-05 11:06:36 +01:00
Young-Flash
dba67b46a1
update for review
2024-03-02 10:01:04 +08:00
Young-Flash
2e87f31fe9
add HoverDisplayConfig
2024-02-22 17:37:40 +08:00
Young-Flash
35ec5955eb
add config item for hover display
2024-02-21 11:08:45 +08:00
Lukas Wirth
85203d9721
Render assoc item owner in hover for items other than functions
2024-02-20 13:16:12 +01:00
Lukas Wirth
a822291a02
Infallible definition hovers
2024-02-19 18:16:02 +01:00
Tetsuharu Ohzeki
8c2f301a41
ide: Fix warnings about clippy str_to_string rule
2024-02-10 01:00:40 +09:00
Johann Hemmann
fad4fa163c
cargo clippy --fix
2024-01-18 13:59:49 +01:00
Lukas Wirth
0bdbf497b6
fix: Fix progress reporting getting stuck
2024-01-17 13:23:00 +01:00
Lukas Wirth
0a75a8c061
Notable traits for type info hovers
2024-01-16 20:15:31 +01:00
Lukas Wirth
ffeaee84af
Goto type actions for notable trait hovers
2024-01-16 19:59:55 +01:00
Lukas Wirth
82e8355492
feat: Show notable trait impls on hover
2024-01-16 19:17:33 +01:00
Lukas Wirth
cf905cff76
Put layout comment to the top of hovers
2024-01-16 10:46:53 +01:00
Nicolas Guichard
b24914970f
Refactor label & docs from ide::hover::render to ide-db::defs::Definition
...
To build the SymbolInformation::signature_documentation we need access
to the “label” when building the TokenStaticData, preferably without
any markdown markup.
Therefore this refactors ide::hover::render::definition and its helper
functions to give easier access to the label alone.
2024-01-03 10:54:57 +01:00
Lukas Wirth
40acc5250f
Update rustc_abi dependency
2023-10-15 18:57:40 +02:00
Lukas Wirth
8eddc64f86
Simplify
2023-09-02 17:12:57 +02:00
Lukas Wirth
b1575528c0
Move doc comment handling into ide-db
2023-09-02 16:27:26 +02:00
Lukas Wirth
bcff166b3a
Add ExternCrateDecl to HIR
2023-08-02 11:52:55 +02:00
hkalbasi
3a1054fc1c
Replace x with it
2023-07-06 17:33:17 +03:30
Lukas Wirth
3c862507b9
Add render configs for memory layout hovers
2023-05-30 18:36:06 +02:00
Lukas Wirth
1275adc200
Don't leak rustc Layout in hir layer
2023-05-30 13:54:30 +02:00
Lukas Wirth
3514f2f2ab
Render niches on hover
2023-05-30 13:49:43 +02:00
Lukas Wirth
be9cc0baae
Render size, align and offset hover values in hex
2023-05-26 16:41:45 +02:00
Lukas Wirth
c7ef6c25b7
internal: Replace Display impl for Name
2023-05-24 20:55:12 +02:00
hkalbasi
cae9660a1d
Add layout info for enum variant and locals
2023-05-18 21:03:03 +03:30
Lukas Wirth
ba8bcde4f5
Also render coercions for ranged type hover on closures
2023-05-15 19:45:01 +02:00
Lukas Wirth
08dc0e21af
feat: Render hover actions for closure captures and sig
2023-05-15 19:35:27 +02:00
bors
d3ce333ec8
Auto merge of #14742 - Veykril:closure-capture-inlays, r=Veykril
...
feat: Closure capture inlay hints
I opted for a fictional `move(foo, &bar, &mut qux)` syntax here, disabled by default as these are not correct rust syntax and hence could cause confusion.

2023-05-08 09:52:29 +00:00
Lukas Wirth
4c5fd19ee5
Render places in capture inlay hints
2023-05-08 09:50:58 +02:00
Yury Ivanou
8e1ba7fdab
Fix memory layout config not working for closures
2023-05-07 19:10:01 +03:00
Yury Ivanou
4ed0fa8414
Add config for disabling hover memory layout data
2023-05-07 18:21:07 +03:00
Yury Ivanou
ecc081d625
Show type alias layout on hover
2023-05-06 16:58:57 +03:00
hkalbasi
6312fbf521
MIR episode 4
2023-05-01 23:23:10 +03:30
hkalbasi
5df545b3f0
Add hover for closure
2023-04-30 14:31:43 +03:30
hkalbasi
3303a6eff5
Implement some intrinsics
2023-03-20 21:48:01 +03:30
hkalbasi
61ad6a96ad
Add BindingId
2023-03-06 21:09:08 +03:30
hkalbasi
ae8ce99d97
Bring back the hex in const hover
2023-03-05 13:53:49 +03:30
Ryo Yoshida
29c957f973
Lower and handle trait aliases in HIR
2023-03-04 00:24:07 +09:00