Commit Graph

1084 Commits

Author SHA1 Message Date
Yoshua Wuyts
f64aacc0c1 Use minicore 2021-08-08 18:58:42 +02:00
Lukas Wirth
f55441f7ed Document reference highlighting mod 2021-08-04 19:00:52 +02:00
bors[bot]
1b02cafa43
Merge #9734
9734: semantic highlighting: add reference hlmod r=matklad a=jhgg

This PR adds the "reference" highlight modifier! 

I basically went around and looked for `HlMod::Mutable` to find the callsites to add a reference. I think these all make sense! 

Co-authored-by: Jake Heinz <jh@discordapp.com>
Co-authored-by: Jake <jh@discordapp.com>
2021-08-04 09:37:30 +00:00
Jake Heinz
19b1d505db match style 2021-08-04 06:14:58 +00:00
Jake Heinz
44726b6ca3 fix + update expects 2021-08-04 06:12:41 +00:00
Jake
e01ff775ae
Apply suggestions from code review
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-03 23:07:46 -07:00
Jake
28b6a30752
Update crates/ide/src/syntax_highlighting/highlight.rs
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-08-03 09:54:27 -07:00
Lukas Wirth
b96f1adf5c Give TypeInfo fields and methods more appropriate names 2021-08-03 17:28:51 +02:00
Lukas Wirth
8afa2722b2 Revise TypeInfo::ty usage 2021-08-03 17:24:43 +02:00
Lukas Wirth
25ff7171c4 Introduce TypeInfo 2021-08-03 16:41:53 +02:00
bors[bot]
29506b5a26
Merge #9762
9762: fix: Fix ranged hover result range r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-02 16:17:15 +00:00
Lukas Wirth
8e0a7d8c08 Fix ranged hover result range 2021-08-02 18:16:47 +02:00
bors[bot]
cae54d86d8
Merge #9761
9761: feat: Show coerced types on type hover r=Veykril a=Veykril

This applies to both the ranged hover request as well as the normal hover type fallback.
![image](https://user-images.githubusercontent.com/3757771/127883884-2935b624-a3e5-4f35-861a-7d6d3266d187.png)
![image](https://user-images.githubusercontent.com/3757771/127883951-4ff96b6b-7576-4886-887b-1198c1121841.png)

We unfortunately have to leave out syntax highlighting here as otherwise the `Type` and `Coerced` words in the hover will get colored.

Note that this does not show all the coercions yet(and almost no pattern coercions) as not all coercion adjustments are implemented yet.

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-02 15:44:43 +00:00
Lukas Wirth
f2d2ce03c7 Also search for pattern nodes in ranged hover 2021-08-02 17:38:16 +02:00
Lukas Wirth
486603d559 Show coerced types on type hover 2021-08-02 17:10:36 +02:00
bors[bot]
0d56ff2a02
Merge #9758
9758: internal: explain that we don't `ref` in style.md r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-08-02 13:00:07 +00:00
Aleksey Kladov
12d7f5b56e internal: explain that we don't ref in style.md 2021-08-02 15:59:28 +03:00
Lukas Wirth
62ab73767f resolve_doc_path is able to resolve to macros 2021-08-02 14:33:09 +02:00
Lukas Wirth
1edbaa29f9 Wrap inner tail expressions in MissingOkOrSomeInTailExpr 2021-07-31 20:00:09 +02:00
Lukas Wirth
f7c7f89c3c Annotate type hints for pattern name ranges instead of the pattern itself 2021-07-31 15:30:45 +02:00
Lukas Wirth
b363755901 Fix hover range for derive inputs 2021-07-31 14:59:31 +02:00
Jake Heinz
0eb1afdcb7 update expects 2021-07-31 06:08:05 +00:00
Jake Heinz
0f434b8620 move to else f 2021-07-31 04:50:19 +00:00
Jake Heinz
2baef17bb1 semantic highlighting: add reference hlmod 2021-07-31 04:42:47 +00:00
bors[bot]
0a3ac7a96c
Merge #9728
9728: fix: Attach comma token to MATCH_ARM instead of MATCH_ARM_LIST r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-30 14:11:37 +00:00
Lukas Wirth
836784f02b Fix move_item test fixture indentations 2021-07-30 13:03:28 +02:00
Lukas Wirth
4de447b293 Attach comma token to MATCH_ARM instead of MATCH_ARM_LIST 2021-07-29 23:02:52 +02:00
Lukas Wirth
2b461c50d7 Refine extraction targets of extract_function assist 2021-07-29 15:45:05 +02:00
Alexander González
4d3a0529d5 fix: Revert removing [] from the hover gif 2021-07-28 06:58:19 -04:00
Alexander Gonzalez
41943f2328 refactor: Apply PR suggestions 2021-07-27 18:31:21 -04:00
Alexander Gonzalez
743c037a34 chore: Remove unnecessary println! call 2021-07-27 18:31:21 -04:00
Alexander Gonzalez
506db1852c test: Add tests for when hovering fails 2021-07-27 18:29:22 -04:00
Alexander Gonzalez
48f43df7d6 docs: Improve the comments in crates/ide/src/hover.rs 2021-07-27 18:29:22 -04:00
Alexander Gonzalez
6310786ca5 test: Add hover_range tests 2021-07-27 18:29:22 -04:00
Alexander Gonzalez
1a0a5da1a4 refactor: Make handle_hover handle ranges too 2021-07-27 18:29:22 -04:00
Alexander Gonzalez
8ca3bb8fcd feat: Add the hover_range capability 2021-07-27 18:29:22 -04:00
Alexander Gonzalez
20c64cc0e6 feat: Extend the server with the hover_range capability 2021-07-27 18:29:22 -04:00
Lukas Wirth
3fab50019c Simplify 2021-07-26 20:26:24 +02:00
Lukas Wirth
bfe0fa009e Resolve derive attribute input macro paths in ide layer 2021-07-24 20:35:43 +02:00
Jonas Schievink
3efdf6861f Complete editable private items 2021-07-23 19:57:16 +02:00
Kevin DeLorey
efb6587664 Added tests to ensure config behavior. 2021-07-22 19:35:47 -06:00
Kevin DeLorey
b75e0e7bb1 Initial commit of highlight related configuration w/ implementation. 2021-07-22 19:35:47 -06:00
Lukas Wirth
ef6fed052c Correctly classify Rename Names 2021-07-23 02:14:59 +02:00
Laurențiu Nicola
efcc487dff Fix a couple of clippy nits 2021-07-22 09:03:54 +03:00
Lukas Wirth
c83e37c001 cov-mark 2021-07-20 19:00:52 +02:00
bors[bot]
4705df44c7
Merge #9637
9637: Overhaul doc_links testing infra r=Veykril a=Veykril

and fix several issues with current implementation.

Fixes #9617

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-20 16:06:37 +00:00
Lukas Wirth
2e39d4757b More tests 2021-07-20 18:05:25 +02:00
Lukas Wirth
bb71ebb985 Move doc_links tests from hover to doc_links 2021-07-20 17:57:47 +02:00
Lukas Wirth
a35687fe1f Minor cleanups 2021-07-20 17:41:10 +02:00
Lukas Wirth
cb7b4a5d5b Some more fragment fixes 2021-07-20 17:03:39 +02:00