Aleksey Kladov
a0c4dbc399
Minor
2020-11-17 15:25:58 +01:00
Aleksey Kladov
db218006c9
Remove dead code
2020-11-17 15:25:57 +01:00
Aleksey Kladov
0d19ee1d70
Simplify
2020-11-17 15:25:57 +01:00
Aleksey Kladov
17e8a00b0b
Use standard code style for test fixtures
2020-11-17 14:43:23 +01:00
Aleksey Kladov
8c6f933773
**Unwrap Block** supports stand-alone blocks
2020-11-17 14:33:30 +01:00
Aleksey Kladov
10fa9c595a
Simplify
2020-11-17 14:33:30 +01:00
Aleksey Kladov
8dd0b7d2b5
Assist target should point at *existing* code
2020-11-17 14:33:30 +01:00
Aleksey Kladov
9a30707281
Add **Ignore Test** assist
2020-11-17 14:22:04 +01:00
bors[bot]
10e3a9879c
Merge #6571
...
6571: Cleanup project model r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-11-17 10:53:12 +00:00
Aleksey Kladov
0dc1742187
Remove needless alloc
2020-11-17 11:52:28 +01:00
Aleksey Kladov
e4927d52e2
Compress code
2020-11-17 11:52:28 +01:00
Aleksey Kladov
a6960fb3b8
simplify
2020-11-17 11:31:40 +01:00
kjeremy
233fdb12ce
Latest LSP 3.16 protocol
...
Pulls in https://github.com/gluon-lang/lsp-types/pull/186
2020-11-16 15:10:13 -05:00
Aleksey Kladov
682dd4dac0
Prepare to recompute completions on every keystroke
...
If we set `is_incomplete: true`, VS Code will re-query completions
after every keypress.
2020-11-16 17:27:36 +01:00
bors[bot]
789d9ca1d3
Merge #6563
...
6563: Don't complete keywords in struct initializers r=matklad a=Veykril
Fixes #6562
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-16 11:49:48 +00:00
Lukas Wirth
fb71185692
Don't complete keywords in struct literals
2020-11-16 12:23:18 +01:00
bors[bot]
e17d604888
Merge #6558
...
6558: format string highlighting: handle hex + debug type specifier r=matklad a=ruabmbua
Should fix https://github.com/rust-analyzer/rust-analyzer/issues/6427
Co-authored-by: Roland Ruckerbauer <roland.rucky@gmail.com>
2020-11-16 11:07:29 +00:00
bors[bot]
382361c252
Merge #6552
...
6552: Properly handle shorthands in destructure patterns when renaming r=SomeoneToIgnore a=Veykril
Fixes #6548 and #6551 .
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-15 18:51:23 +00:00
Roland Ruckerbauer
a15dda48c6
format string highlighting: handle hex + debug type specifier
2020-11-15 17:43:14 +01:00
Lukas Wirth
f3e297331c
Cleanup edit_text_range_for_record_field_expr_or_pat
2020-11-15 16:11:06 +01:00
Lukas Wirth
cb60708274
Use shorthand field syntax in destructures
2020-11-14 21:08:20 +01:00
Lukas Wirth
924eecf4af
Properly handle shorthands in destructure patterns when renaming
2020-11-14 19:11:09 +01:00
Lukas Wirth
e55a44a831
Use shorthand record syntax when renaming struct initializer field
2020-11-14 17:51:09 +01:00
bors[bot]
e8c803937c
Merge #6544
...
6544: add suggestion ..Default::default() for remaining struct fields in a constructor r=bnjjj a=bnjjj
I'm not sure I should import `assists` crate inside `completions`, maybe we should move out `FamousDefs` from `assists` ? Let me know :)
close #6492
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-11-13 23:30:13 +00:00
Benjamin Coenen
9f15de77f9
add suggestion ..Default::default() for remaining struct fields in a constructor #6492
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-11-13 23:20:26 +01:00
Aleksey Kladov
b1377363df
Remove dead code
2020-11-13 17:53:48 +01:00
Aleksey Kladov
4dfda64b39
Cleanup workspace loading a tiny bit
2020-11-13 17:38:26 +01:00
Benjamin Coenen
e73d140b51
add suggestion ..Default::default() for remaining struct fields in a constructor #6492
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-11-13 17:17:16 +01:00
Aleksey Kladov
aeda30e301
Move tricky workspace logic to a separate module
2020-11-13 16:44:48 +01:00
Aleksey Kladov
f0f13d8cfa
cleanup
2020-11-13 16:32:57 +01:00
bors[bot]
b0ad492e3d
Merge #6519
...
6519: Add "Open Cargo.toml" action r=matklad a=p3achyjr
## What is it?
This adds an "open cargo.toml" action from the vscode shell, resolves #6462
## Test
Ran ```cargo xtask install --server``` and ```cargo xtask install --client```, then ```Developer: Reload Window```.
![image](https://user-images.githubusercontent.com/8763808/98614382-2a578f00-22ad-11eb-9811-4a72a54ff6fb.png )
When clicked:
![image](https://user-images.githubusercontent.com/8763808/98618176-77d7fa00-22b5-11eb-8788-35256542f3a6.png )
Co-authored-by: Anatol Liu <axlui@anatols-mbp.lan>
2020-11-13 15:25:26 +00:00
Anatol Liu
b1b7727e04
add open Cargo.toml action
2020-11-12 17:48:07 -08:00
bors[bot]
ddccaecb79
Merge #6524
...
6524: Add support for loading rustc private crates r=matklad a=xldenis
This PR presents a solution to the problem of making`rustc_private` crates visible to `rust-analyzer`.
Currently developers add dependencies to those crates behind a `cfg(NOT_A_TARGET)` target to prevent `cargo` from building them.
This solution is unsatisfactory since it requires modifying `Cargo.toml` and causes problems for collaboration or CI.
The proposed solution suggested by @matklad is to allow users to give RA a path where the `rustc` sources could be found and then load that like a normal workspace.
This PR implements this solution by adding a `rustcSource` configuration item and adding the cargo metadata to the crate graph if it is provided.
------
I have no idea how this should be tested, or if this code is generally tested at all. I've locally run the extension with these changes and it correctly loads the relevant crates on a `rustc_private` project of mine.
Co-authored-by: Xavier Denis <xldenis@gmail.com>
2020-11-12 17:55:32 +00:00
Xavier Denis
89ce6b6664
Address review comments
2020-11-12 18:49:22 +01:00
bors[bot]
cf73b6851b
Merge #6514
...
6514: Fix extract_struct_from_enum_variant not updating record references r=Veykril a=Veykril
Related to #6510
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-12 17:48:25 +00:00
Lukas Wirth
ccdcd52975
Add extra test to extract_struct_from_enum_variant
2020-11-12 18:44:37 +01:00
bors[bot]
13cf3b4886
Merge #6513
...
6513: Support qualified function calls in remove_unused_param r=Veykril a=Veykril
Also adds a test to check that it removes unused params across files.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-12 17:12:21 +00:00
Lukas Wirth
b6e2b28353
Support qualified function calls in remove_unused_param
2020-11-12 18:04:42 +01:00
Lukas Wirth
9454a9e536
Use Module::find_use_path_prefixed in extract_struct_from_enum_variant assist
2020-11-12 17:32:45 +01:00
Lukas Wirth
e24cc77cd1
Fix extract_struct_from_enum_variant not updating record references
2020-11-12 17:13:33 +01:00
Kirill Bulatov
07e633ef0a
Remove the fixme
2020-11-12 13:52:24 +02:00
Kirill Bulatov
3481ea96bd
Add a FIXME for non-unified inner attributes
2020-11-12 13:46:02 +02:00
Kirill Bulatov
335edf87bc
Do not insert imports before inner comments
2020-11-12 13:46:02 +02:00
Aleksey Kladov
a27186636d
Fix attachment of inner doc comments
2020-11-12 12:09:12 +01:00
Aleksey Kladov
81ac99f60a
Simplify code
2020-11-12 11:45:18 +01:00
Aleksey Kladov
f73b874157
Update tests
2020-11-12 11:19:26 +01:00
kjeremy
3b9d164043
Update crates
2020-11-11 11:17:48 -05:00
Xavier Denis
16443760a3
Reorder rustc_private loading
2020-11-11 13:04:27 +01:00
Xavier Denis
8716087919
Add support for loading rustc private crates
2020-11-11 12:45:40 +01:00
Aleksey Kladov
731f7bfc02
Replace RacyFlag with OnceCell
2020-11-11 03:11:40 +01:00