Commit Graph

1294 Commits

Author SHA1 Message Date
Jake Heinz
e8d0989606 ide: display static values in hover 2021-11-18 06:00:51 +00:00
bors[bot]
64a73dcfba
Merge #10785
10785: ide: show const value in hover r=jhgg a=jhgg

fixes #10783

I think my original attempt was incorrect, because it looks like `HirDisplay` is used in more places than just the hover.  

So, I've attempted it again in 312eafe, this time specifically just rendering the value in `hover::render`

pictoral:

![image](https://user-images.githubusercontent.com/5489149/142163890-b6aa2ab4-7bd0-4dd3-b35d-5eaa83fffb7f.png)


Co-authored-by: Jake Heinz <jh@discordapp.com>
Co-authored-by: Jake <jh@discordapp.com>
2021-11-18 04:17:16 +00:00
Jake Heinz
aef8882254 more complicated const test 2021-11-18 04:15:02 +00:00
Lukas Wirth
91bbc55eed Check for derive attributes by item path, not derive identifier 2021-11-17 20:46:57 +01:00
Jake Heinz
312eafe916 maybe this is better?? 2021-11-17 07:02:49 +00:00
Jake Heinz
4fbc4b9356 hir: show const value in hover 2021-11-17 05:49:27 +00:00
Lukas Wirth
366499c3be Do not use reference search in runnables::related_tests 2021-11-16 21:32:02 +01:00
Lukas Wirth
0ff380fe17 Simplify 2021-11-16 21:26:34 +01:00
Lukas Wirth
b57289c4cb Skip test/bench attr expansion in resolution instead of collection 2021-11-16 20:23:56 +01:00
Lukas Wirth
92f7db447c minor: Lift out FxIndex{Map/Set} types into ide_db 2021-11-16 12:15:47 +01:00
Lukas Wirth
d2513deb62 fix: Reimplement mapping out of test/bench attributes for runnables 2021-11-16 11:51:24 +01:00
Jake Heinz
520ff62f4e flip the default 2021-11-13 23:39:34 +00:00
Jake Heinz
d3d768de0d inlay hints: add the option to always show constructor inlay hints 2021-11-13 23:12:29 +00:00
Lukas Wirth
2d7f5891f7 Remove faulty logic for ascending test attributes for runnables 2021-11-11 18:47:24 +01:00
Lukas Wirth
a510021065 Replace some more ide usages of ModuleDef with Definition 2021-11-11 18:20:54 +01:00
Jonas Schievink
acbe8bc7ac Prime a more reasonable set of crates 2021-11-11 14:44:12 +01:00
Lukas Wirth
7776aad166 internal: Flatten Definition::ModuleDef variant 2021-11-11 00:05:53 +01:00
Lukas Wirth
26419c0379 Fix proc-macro attributes being shadowed by their functions in IDE layer 2021-11-08 14:49:50 +01:00
bors[bot]
10782bbb39
Merge #10685
10685: fix: Enable markdown tables r=Veykril a=Veykril

Should fix https://github.com/rust-analyzer/rust-analyzer/issues/10655
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-05 11:25:17 +00:00
Lukas Wirth
439a8194b0 Replace more Name::to_string usages with Name::to_smol_str 2021-11-04 18:12:05 +01:00
Lukas Wirth
4d4574f5b6 Enable markdown tables 2021-11-04 17:36:58 +01:00
bors[bot]
962be38004
Merge #10645
10645: fix: make `rename` multi-token mapping aware r=Veykril a=spookyvision



Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Anatol Ulrich <45840+spookyvision@users.noreply.github.com>
2021-11-04 16:31:16 +00:00
bors[bot]
c96481e25f
Merge #10691
10691: minor: Use array `into_iter` in more places r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-11-04 05:52:05 +00:00
Laurențiu Nicola
139bf9b4e1 Use array into_iter in more places 2021-11-04 07:51:20 +02:00
Anatol Ulrich
83927e08a8
Update crates/ide/src/rename.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-03 15:44:32 +01:00
Lukas Wirth
52f5af7165 Expose version string of crates fom HIR 2021-11-03 15:40:06 +01:00
Anatol Ulrich
9bce4d6696 accept identical Indels when merging; add rename test case 2021-11-02 21:38:38 +01:00
Lukas Wirth
7fdbdc4ab2 Enable auto-import and qualify-path in derive attributes 2021-10-28 18:40:38 +02:00
Lukas Wirth
3018ffd85e Refactor ide handling for paths in derive inputs 2021-10-28 16:47:19 +02:00
Anatol Ulrich
1ac35532c4 remove TODO comment 2021-10-27 17:26:38 +02:00
Anatol Ulrich
df9fb9b159 re-introduce always! 2021-10-27 17:25:42 +02:00
Anatol Ulrich
28c73f8374 unwrap-- 2021-10-27 17:23:23 +02:00
Anatol Ulrich
4a1a5ff54e fix logic error: alias detection was too lenient 2021-10-27 17:20:12 +02:00
Anatol Ulrich
6cd15c296d wip 2021-10-27 15:40:49 +02:00
Anatol Ulrich
8d3ac328ee remove resolved TODO questions 2021-10-27 15:40:30 +02:00
Anatol Ulrich
f244ed6a1a doxx 2021-10-27 04:46:02 +02:00
Anatol Ulrich
2e0610e64e one down 2021-10-27 04:42:58 +02:00
Anatol Ulrich
95199ac30b make imports less odd 2021-10-27 04:36:32 +02:00
Anatol Ulrich
6decfceae1 WIP: fix: make rename multi-token mapping aware 2021-10-27 04:31:14 +02:00
bors[bot]
a3830dfd3b
Merge #10641
10641: fix: make `expand_macro` multi-token mapping aware r=spookyvision a=spookyvision



Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
Co-authored-by: Anatol Ulrich <45840+spookyvision@users.noreply.github.com>
2021-10-26 18:18:22 +00:00
Anatol Ulrich
b42093915a
Update crates/ide/src/expand_macro.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-26 20:17:47 +02:00
Anatol Ulrich
e6913be47b fix test 2021-10-26 20:15:25 +02:00
Anatol Ulrich
04f2eb0fba wording 2021-10-26 20:10:09 +02:00
Anatol Ulrich
3f82989153 fix: make expand_macro multi-token mapping aware 2021-10-26 20:09:14 +02:00
bors[bot]
c48730cb72
Merge #10639 #10640
10639: fix: make `goto_declaration` multi-token mapping aware r=Veykril a=spookyvision



10640: assume valid identifier r=Veykril a=spookyvision

improve https://github.com/rust-analyzer/rust-analyzer/pull/10637/ by always returning `Some(potentially_empty_vec)` instead of `None` in the empty case

Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
2021-10-26 17:51:33 +00:00
Anatol Ulrich
53be26df50 assume valid identifier 2021-10-26 19:33:50 +02:00
Anatol Ulrich
d8ed15b6a6 fix: make goto_declaration multi-token mapping aware 2021-10-26 19:31:49 +02:00
Anatol Ulrich
c69879423e fix imports 2021-10-26 12:34:40 +02:00
Anatol Ulrich
686f8fbea3 simplify 2021-10-26 12:21:18 +02:00
Anatol Ulrich
2490807ca5 fix: make goto_type_definition multi-token mapping aware 2021-10-25 23:43:58 +02:00