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
21da6c6164
Add config hover_show_adtFieldsOrVariants to handle hovering limitation for ADTs
2024-04-16 16:26:23 +08:00
Young-Flash
1c85234bcd
limit struct field hover display nums
2024-03-25 19:55:19 +08: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
a822291a02
Infallible definition hovers
2024-02-19 18:16:02 +01:00
Johann Hemmann
04ccef80cb
field_reassign_with_default
2024-01-31 19:06:18 +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
384488c157
feat: Hover for literals showing additional value information
2024-01-16 14:28:47 +01:00
Lukas Wirth
9cb13b6efb
Allow navigation targets to be duplicated when the focus range lies in the macro definition site
2023-12-06 12:38:19 +01:00
Lukas Wirth
d2cd30007c
Implicit format args support
2023-12-05 17:07:00 +01:00
Lukas Wirth
5b8e386bae
Improve macro descension API
2023-12-05 17:06:57 +01:00
DaniPopes
588c7d9182
minor: hover_simple refactor
2023-09-24 22:47:29 +02:00
Lukas Wirth
53b292478d
internal: Add offset param to token descending API
2023-08-16 10:07:18 +02:00
Lukas Wirth
bcff166b3a
Add ExternCrateDecl to HIR
2023-08-02 11:52:55 +02:00
Lukas Wirth
3c862507b9
Add render configs for memory layout hovers
2023-05-30 18:36:06 +02:00
Lukas Wirth
c7ef6c25b7
internal: Replace Display impl for Name
2023-05-24 20:55:12 +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
Jake Heinz
3132a9e7fc
fix: ide: exclude sized in go-to actions
2023-05-02 08:19:59 +00: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
cd67589f63
beginning of MIR
2023-02-27 23:45:54 +03:30
Lukas Wirth
e550e553e0
fix: Bring back hovering call parens for return type info
2023-02-15 18:58:59 +01:00
Lukas Wirth
4685b97f74
Remove hover fallback in favor of ranged hover
2023-01-20 21:52:05 +01:00
Lukas Wirth
a542bd46bf
Split out some hover functions
2023-01-20 16:30:08 +01:00
Lukas Wirth
c5b1e3f2ae
Fix markdown removal in hover handling whitespace weirdly
2023-01-20 14:29:12 +01:00
Maybe Waffle
a7787533af
Use the fact that Either
: AstNode
2023-01-14 15:20:32 +00:00
Daniel Eades
ed128872eb
remove needless borrows
2023-01-02 14:52:32 +00:00
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Kartavya Vashishtha
a26aef9055
fix formatting
2022-11-25 12:22:06 +05:30
Kartavya Vashishtha
e86d451484
fix token method call
2022-11-25 12:20:34 +05:30
Kartavya Vashishtha
132d5ffc7d
add back [] in hover documentation
2022-11-25 12:04:14 +05:30
Kartavya Vashishtha
f64feeb11a
Correct node traversal to look at parent instead
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-11-24 22:32:15 -08:00
Kartavya Vashishtha
29951f9766
fix formatting
2022-11-19 21:23:33 +05:30
Kartavya Vashishtha
87658c8173
refactor hover
...
change struct_rest_pat to guarentee a HoverResult
Move token and node matching out of struct_rest_pat into hover
2022-11-19 21:22:10 +05:30
Kartavya Vashishtha
8b17681058
fix formatting
...
and remove unnecessary check
2022-11-19 11:34:49 +05:30
Kartavya Vashishtha
0ffb361eb9
feat: adds hover hint to ".." in record pattern
...
currently only works with struct pattern
2022-11-19 11:10:47 +05:30
Lukas Wirth
e50712cf2c
fix: Fix hover in attributed items not preferring similar kinded tokens
2022-11-11 13:38:07 +01:00
Jonas Schievink
0616cee92b
Add a setting for keyword hover popups
2022-08-16 16:51:40 +02:00
Lukas Wirth
3f149a63d2
Simplify
2022-08-15 16:40:10 +02:00
Lukas Wirth
d6e78b04d0
feat: Handle operators like their trait functions in the IDE
2022-08-05 14:16:36 +02:00
Jean santos
5698e51027
tidy formatting
2022-08-04 09:28:34 -03:00