Commit graph

184 commits

Author SHA1 Message Date
Lukas Wirth
b9dbb8afd9 Regenerate lints table 2024-03-04 17:42:18 +01:00
bors
0b7d4cc6ff Auto merge of #16690 - roife:fix-issue-16471, r=Veykril
fix: use 4 spaces for indentation in macro expansion

Partial fix for #16471.

In the previous code, the indentation produced by macro expansion was set to 2 spaces. This PR modifies it to 4 spaces for the sake of consistency.
2024-03-04 08:49:51 +00:00
Young-Flash
dba67b46a1 update for review 2024-03-02 10:01:04 +08:00
Lukas Wirth
ab533d887d fix: Ignore generic arguments in intra doc link path resolution 2024-02-28 14:47:47 +01:00
roife
ec5236f3a8 test: use 4 spaces for indetation in macro expansion 2024-02-27 20:53:07 +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
Young-Flash
00358b1fe0 rebase on lastest master 2024-02-21 10:57:39 +08:00
Young-Flash
dba167592e feat: add hover display for trait assoc items 2024-02-21 10:57:39 +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
Tavo Annus
125791386d Cleanup term search related changes 2024-02-11 14:35:54 +02:00
Lukas Wirth
ddddc9c0e2 Update test outputs 2024-02-08 14:57:21 +01:00
Lukas Wirth
81ea48a573 fix: Fix tuple structs not rendering visibility in their fields 2024-02-08 10:05:28 +01:00
Lukas Wirth
5860763f18 Cleanup error variants in MIR code slightly 2024-01-30 09:53:39 +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
384488c157 feat: Hover for literals showing additional value information 2024-01-16 14:28:47 +01:00
Lukas Wirth
cf905cff76 Put layout comment to the top of hovers 2024-01-16 10:46:53 +01:00
Lukas Wirth
35fbc0210c Fallback to method resolution on unresolved field access with matching method name 2023-12-08 16:36:41 +01:00
Lukas Wirth
4525787ed5 Add test for implicit format args support through nested macro call 2023-12-05 17:07:00 +01:00
Lukas Wirth
d2cd30007c Implicit format args support 2023-12-05 17:07:00 +01:00
YangzeLuo
41bcd542e2 feat: preview adt field when hover 2023-11-08 21:45:32 +08:00
DaniPopes
53f5c1c13f
internal: re-generate lints.rs 2023-09-29 14:20:17 +02:00
Lukas Wirth
c0e402637e Emit builtin#format_args in builtin format_args expander 2023-09-06 18:08:20 +02:00
ponyii
fec5ff9890 start hovering default values of generic constants 2023-08-15 20:26:42 +04:00
oxalica
3bfe1d5d78
Display fully qualified associated types correctly
Currently they are formatted in the internal `Trait<Self = Type>::Assoc`
forms where `hir_ty::TypeRef` is formatted, like hover.
2023-08-09 00:04:55 +08:00
bors
f98d654ddf Auto merge of #15350 - max-heller:issue-11756, r=Veykril
Handle `#[cfg]`s on generic parameters

Records attributes on generic parameters in the item tree and filters out generic parameters disabled by `#[cfg]`s in `generic_params_query`.

Closes #11756
2023-08-08 13:05:26 +00:00
Lukas Wirth
bcff166b3a Add ExternCrateDecl to HIR 2023-08-02 11:52:55 +02:00
Max Heller
37a8493138 tests 2023-07-28 06:45:35 -04:00
hkalbasi
171ae2ee5d Fix size_of_val and support min_align_of_val 2023-07-06 15:41:52 +03:30
dfireBird
410ede9101
Add some tests in number evaluvation and hover to prevent regression
Added a test near positive extermes and two test near negative
extermes as well one for 0.
Added a test using the `as` cast and one with comparison with 0.
2023-06-22 17:58:12 +05:30
hkalbasi
1dd76e8a9d Fix panic in displaying unsized structs 2023-06-10 11:32:37 +03:30
hkalbasi
6fbf6ef514 Fix panic in displaying const trait objects 2023-06-10 02:10:52 +03:30
hkalbasi
a6a27a7ff8 Support floating point intrinsics in const eval 2023-06-02 17:29:17 +03:30
hkalbasi
f9e3b180b7 Add enum, reference, array and slice to render_const_scalar 2023-06-02 13:47:02 +03:30
Lukas Wirth
3c862507b9 Add render configs for memory layout hovers 2023-05-30 18:36:06 +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
hkalbasi
60379dabfb resolve types in closure capture copy detection 2023-05-19 14:54:57 +03:30
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
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
bors
94ac1cdbf5 Auto merge of #14715 - Veykril:symbol-index, r=Veykril
Refactor symbol index

Closes https://github.com/rust-lang/rust-analyzer/issues/14677

instead of eagerly fetching the source data in symbol index we do it lazily now, this shouldn't make it much more expensive as we had to parse the source most of the time anyways even after fetching.
2023-05-02 10:34:53 +00:00
Lukas Wirth
f501c6a516 Refactor symbol index 2023-05-02 12:11:42 +02:00