Commit Graph

6696 Commits

Author SHA1 Message Date
Kirill Bulatov
3969c7c853 Ensure hover shows full type declaration 2019-12-19 12:45:00 +02:00
Kirill Bulatov
14c167a9f6 Omit default parameter types 2019-12-19 12:27:33 +02:00
Edwin Cheng
dddee23f43 Add std::ops::Index support for infering 2019-12-19 12:45:07 +08:00
bors[bot]
8dd0e0086f
Merge #2589 #2591
2589: Touch up docs r=matklad a=matklad



2591: Remove dead code r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-18 16:54:28 +00:00
Aleksey Kladov
afdeacf3c1 Remove dead code 2019-12-18 17:52:52 +01:00
bors[bot]
b63c7ecab9
Merge #2311
2311: See through Macros for SignatureHelp r=matklad a=kjeremy

Note: we meed to skip the trivia filter to make sure that
`covers!(call_info_bad_offset)` succeeds otherwise we exit call_info
too early.

Also the test doesn't pass: `FnCallNode::with_node` always detects
a MacroCall which is obviously wrong.

Fixes #2310 

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-12-18 16:44:35 +00:00
Aleksey Kladov
d33fc26e05 Touch up docs 2019-12-18 17:42:49 +01:00
Aleksey Kladov
04715cbe1c Forbid <T>::foo syntax in mod paths 2019-12-18 17:41:33 +01:00
Aleksey Kladov
88c6109897 Move PathKindUp 2019-12-18 17:06:52 +01:00
Aleksey Kladov
d043689735 Touch up docs 2019-12-18 17:04:20 +01:00
bors[bot]
7ea5780867
Merge #2588
2588: Don't bother with focus range for navigation to locals r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-18 15:47:58 +00:00
Aleksey Kladov
7c25224f05 Don't bother with focus range for navigation to locals 2019-12-18 16:45:42 +01:00
bors[bot]
048d0cda97
Merge #2587
2587: Refactor goto tests to always specify texts r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-18 15:04:08 +00:00
Aleksey Kladov
46a299bcee Refactor goto tests to always specify texts 2019-12-18 16:00:35 +01:00
Aleksey Kladov
69c944a1e2 Add blank lines for readability 2019-12-18 16:00:35 +01:00
bors[bot]
c651cf7cd1
Merge #2586
2586: Make reformat hook actually reformat files r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-18 14:47:04 +00:00
Aleksey Kladov
6e48a5bf91 Make reformat hook actually reformat files 2019-12-18 15:45:24 +01:00
Jeremy Kolb
83dc5e7949 cargo fmt 2019-12-18 09:11:47 -05:00
Jeremy Kolb
cdc6af6bda Pass test 2019-12-18 08:58:48 -05:00
bors[bot]
e0d9d75510
Merge #2585
2585: Cleanup Vim and NeoVim instructions. Fix #2579 r=oblitum a=oblitum

I took some freedom to remove additional tips that I simply considered unnecessary as I view it as responsibility of plugin's own docs.

Co-authored-by: Francisco Lopes <francisco@oblita.com>
2019-12-18 13:56:36 +00:00
kjeremy
7ec43ee07a WIP: See through Macros for SignatureHelp
Note: we meed to skip the trivia filter to make sure that
`covers!(call_info_bad_offset)` succeeds otherwise we exit call_info
too early.

Also the test doesn't pass: `FnCallNode::with_node` always detects
a MacroCall.
2019-12-18 08:49:06 -05:00
bors[bot]
242f0ae1d8
Merge #2545
2545: Add Token id to all tt::TokenTree r=matklad a=edwin0cheng

This PR try to add token id to all `tt::Leaf` and `tt::Delimiter`.

~~Some tests are failed now because of #2544~~ 

~~Still blocked by a test in goto-definition : see https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-565572553~~

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-12-18 11:47:50 +00:00
Edwin Cheng
41544a4088 Refactoring 2019-12-18 13:10:37 +08:00
Edwin Cheng
2ea1cfd780 Rename range to by_kind 2019-12-18 11:36:10 +08:00
Edwin Cheng
e16f3a5ee2 Add test for token map 2019-12-18 11:20:23 +08:00
Edwin Cheng
325532d119 Fix shift id for delim and other tokens 2019-12-18 11:20:23 +08:00
Edwin Cheng
320416d756 Add TokenTextRange 2019-12-18 11:20:22 +08:00
Edwin Cheng
59295854f8 Add token id to delims 2019-12-18 11:20:22 +08:00
Edwin Cheng
aceb9d7fb0 Add token ids for all tt::Leaf 2019-12-18 11:20:22 +08:00
bors[bot]
46ca40ccfc
Merge #2575
2575: [VS Code Extension] Remap error location if it extracted inside macros r=edwin0cheng a=edwin0cheng

It should fix for #2569






Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-12-18 03:03:51 +00:00
Edwin Cheng
bb9c60d908 Use substr instead of endswith 2019-12-18 10:50:54 +08:00
Edwin Cheng
63c59308e6 Add tests 2019-12-18 10:47:45 +08:00
Edwin Cheng
d2c1f8ee26 Add macro span handling 2019-12-18 10:47:45 +08:00
Francisco Lopes
f909d2b56c Cleanup Vim and NeoVim instructions. Fix #2579 2019-12-17 20:57:32 -03:00
bors[bot]
ee93fac776
Merge #2583
2583: Use prettier settings in ts-lint r=matklad a=edwin0cheng

This PR add `tslint-plugin-prettier` extension in ts-lint, which "runs prettier rules as tslint rules." and remove  `quotemark` from ts-lint and let prettier to handle it. 

And also fix #2515

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-12-17 21:12:18 +00:00
Edwin Cheng
da29b7fb14 use pretter settings in ts-lint 2019-12-17 23:50:18 +08:00
bors[bot]
ff8f80579a
Merge #2582
2582: Drop dead code r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-17 15:03:38 +00:00
Aleksey Kladov
0630f8110f Drop dead code 2019-12-17 16:03:15 +01:00
bors[bot]
b90f9e6d59
Merge #2581
2581: Refactor PathKind r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-17 14:39:07 +00:00
Aleksey Kladov
aca022f1d4 Refactor PathKind 2019-12-17 15:38:28 +01:00
bors[bot]
f51a3fed9f
Merge #2580
2580: Fix highlighting token names r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-17 13:46:12 +00:00
Aleksey Kladov
1c8467e20a Fix highlighting token names 2019-12-17 14:45:46 +01:00
bors[bot]
4a58522119
Merge #2562
2562: Fix NavigationTarget ranges r=matklad a=edwin0cheng

Fix the issue described in https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-565572553

This PR change the order for finding `full_range` of `focus_range` in following orders:
1. map both ranges to macro_call
2. map focus range to a token inside macro call, and full range to the whole of macro call
3. map both ranges to the whole of macro call

And fix the corresponding tests and make these tests easily to follow.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-12-17 13:37:32 +00:00
bors[bot]
a26840d603
Merge #2568
2568: Add option to disable all-targets. r=matklad a=pftbest

Can be useful in embedded.

Co-authored-by: Vadzim Dambrouski <vadzim.dambrouski@promwad.com>
2019-12-17 13:28:37 +00:00
bors[bot]
ba6312a2df
Merge #2571
2571: Fixed a typo in settings r=matklad a=omerbenamram

@lnicola found a typo in the description for one of the settings introduced in #2559.

Co-authored-by: Omer Ben-Amram <omerbenamram@gmail.com>
2019-12-17 13:19:59 +00:00
bors[bot]
7191dd7d53
Merge #2578
2578: Default to client watching on VS Code r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-17 11:42:19 +00:00
Aleksey Kladov
2432f278cb Default to client watching on VS Code 2019-12-17 12:41:44 +01:00
bors[bot]
827831de87
Merge #2577
2577: Improve recovery for incomplete lambdas r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-17 11:12:50 +00:00
Aleksey Kladov
3e2f4e4293 Improve recovery for incomplete lambdas 2019-12-17 12:11:01 +01:00
bors[bot]
cb79e30d53
Merge #2572
2572: link website r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-16 17:47:43 +00:00