Commit Graph

1022 Commits

Author SHA1 Message Date
Lukas Wirth
12fe48c04d Use Type::walk for goto_type_definition 2021-07-14 01:42:30 +02:00
bors[bot]
9bd6836513
Merge #9596
9596: Return type arguments in goto_type_definition result  r=Veykril a=Veykril

Fixes #9586
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-13 17:25:00 +00:00
Lukas Wirth
796988a269 Return type arguments in goto_type_definition result 2021-07-13 19:24:29 +02:00
Lukas Wirth
d1256a3709 Assign mutable semantic token modifier to assignment operators 2021-07-13 18:32:02 +02:00
Lukas Wirth
b3337c26db Split main highlighting function up into a few subfunctions 2021-07-13 18:29:57 +02:00
Lukas Wirth
ab2647769c Return both field and local references for shorthands in goto_def 2021-07-11 16:16:16 +02:00
Lukas Wirth
c41f1279a3 Inline name classification reference calls 2021-07-11 15:39:09 +02:00
Lukas Wirth
c65bb7f8b9 Explicitly check for reference locals or fields in Name classification 2021-07-11 15:04:40 +02:00
bors[bot]
87621de2b9
Merge #9567 #9568
9567: remove unneded special case r=matklad a=matklad

bors r+
🤖

9568: feat: add 'for' postfix completion r=lnicola a=mahdi-frms


![Peek 2021-07-11 16-45](https://user-images.githubusercontent.com/62165556/125194692-a0aaf780-e267-11eb-952a-81de7955d9a1.gif)


adds #9561

used ```ele``` as identifier for each element in the iteration

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: mahdi-frms <mahdif1380@outlook.com>
2021-07-11 12:51:33 +00:00
Aleksey Kladov
bbb053532e internal: remove one more needless extern crate 2021-07-11 15:48:49 +03:00
Aleksey Kladov
1171dc74e0 internal: remove unused param 2021-07-11 15:08:00 +03:00
Aleksey Kladov
f42648e305 internal: remove needless distinction between a carte and its root mod 2021-07-11 14:55:24 +03:00
Aleksey Kladov
92059ea438 update tests 2021-07-11 13:55:00 +03:00
Aleksey Kladov
5c26523e94 drop unused fields 2021-07-11 13:51:52 +03:00
Aleksey Kladov
a04775060c simplify 2021-07-11 13:49:38 +03:00
Aleksey Kladov
ddce16a126 drop unused field 2021-07-11 13:48:26 +03:00
Aleksey Kladov
beb81a40eb simplify 2021-07-11 13:45:58 +03:00
Aleksey Kladov
96d85a9efb be explicit about what we *can't* debug 2021-07-11 13:44:28 +03:00
Aleksey Kladov
fa6f78c95b better name 2021-07-11 13:43:43 +03:00
Aleksey Kladov
0dc186f612 Let the client care about presentation 2021-07-11 13:42:19 +03:00
bors[bot]
325140a165
Merge #9449
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-11 09:37:33 +00:00
Lukas Wirth
f1b3446844 Emit test name in Run test runnables if it comes from a macro expansion 2021-07-09 14:35:42 +02:00
Aleksey Kladov
0db4f3f6a4 internal: ensure consistent passing for config params
We pass "context" parametes first, so configs should be on the left.
"Bigger" context wins, so configs goes after db.
2021-07-06 00:00:39 +03:00
Aleksey Kladov
b8a6ea5ab5 feat: make join lines behavior configurable
closes #9492
2021-07-05 23:47:20 +03:00
Aleksey Kladov
86720f2953 minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
Aleksey Kladov
6e9780c005 internal: make CompletionItem and SourceChange consistent
Before this PR, SourceChange used a bool and CompletionItem used an enum
to signify if edit is a snippet. It makes sense to use the same pattern
in both cases. `bool` feels simpler, as there's only one consumer of
this API, and all producers are encapsulated anyway (we check the
capability at the production site).
2021-07-04 15:44:03 +03:00
Aleksey Kladov
f875b91fdb feat: join lines joins two ifs into else if 2021-07-03 18:40:23 +03:00
Lukas Wirth
a7d61ddba4 Add cov_mark 2021-07-02 19:34:49 +02:00
Lukas Wirth
59eec29e1b Fix runnables using wrong file ids for module doctests 2021-07-02 15:43:47 +02:00
Lukas Wirth
0b8e145641 Print runnable kind on assertion failure for better debuggability 2021-07-02 15:34:26 +02:00
Lukas Wirth
f640f2dbb4 Fix incorrect guard for NameRefClass attribute resolution 2021-07-02 15:17:21 +02:00
bors[bot]
334c7eba8d
Merge #9452
9452: feat: Add "View Crate Graph (Full)" r=jonas-schievink a=jonas-schievink

Works like "View Crate Graph", but also includes crates.io and sysroot dependencies. The resulting graph might be enormous.

Closes https://github.com/rust-analyzer/rust-analyzer/issues/8867

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-07-01 22:12:53 +00:00
Jonas Schievink
5f13fb9db9 Add "View Crate Graph (Full)" 2021-07-02 00:10:33 +02:00
bors[bot]
0331d19f42
Merge #9451
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-01 19:52:14 +00:00
Lukas Wirth
81762024b5 Add goto_type_action for field hovers 2021-07-01 21:51:26 +02:00
bors[bot]
2f9645501c
Merge #9436
9436: minor: Add test for macro expanded test module in runnables r=Veykril a=Veykril

Expected this to fail as thats behaving incorrectly on current nightly but I think I fixed this accidentally with https://github.com/rust-analyzer/rust-analyzer/pull/9435
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-30 17:37:28 +00:00
Lukas Wirth
8d3a378de9 Add test for macro expanded test module in runnables 2021-06-30 19:35:58 +02:00
bors[bot]
3c42aefceb
Merge #9435
9435: fix: Don't add test runnables for outline modules in the wrong file r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-30 17:11:34 +00:00
Lukas Wirth
b8507ca98d Don't add test runnables for outline modules in the wrong file 2021-06-30 19:08:13 +02:00
bors[bot]
11b9233fc4
Merge #9269
9269: Recreate status page r=lnicola a=Milo123459

I'm working on redesigning the status page.

Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com>
2021-06-29 19:53:19 +00:00
Milo
4d8fe6208e fix 2021-06-29 20:34:52 +01:00
Milo
d85fa40d58
Update crates/ide/src/status.rs
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2021-06-29 20:32:33 +01:00
Lukas Wirth
9a1b9b3c78 Resolve attribute paths in attribute highlighting 2021-06-28 21:53:17 +02:00
Lukas Wirth
9957220dfe Fix NameRef::classify path resolution inside attributes 2021-06-28 19:07:23 +02:00
Milo
443d2164ef remove unneeded ifs 2021-06-28 17:52:57 +01:00
Milo
2e60908fde check if counts should be a thing 2021-06-28 17:50:24 +01:00
Lukas Wirth
34c28c1bbc Include self in usage search for modules in their definition source 2021-06-28 16:41:35 +02:00
Milo
d1821e4b6e fix all reviews 2021-06-28 07:31:54 +01:00
Lukas Wirth
3ce5c66ca1 Deduplicate ast expression walking logic 2021-06-27 01:11:57 +02:00
bors[bot]
2ac1ffc0f3
Merge #9400
9400: fix: Fix renaming associated trait items with colliding names r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-25 01:48:50 +00:00