Commit graph

4667 commits

Author SHA1 Message Date
Aleksey Kladov
025e1169da install npm deps once 2019-07-29 11:13:16 +03:00
Kirill Bulatov
b133a3b55c Ignore cancelled inlay hints responses 2019-07-29 10:19:35 +03:00
Alexander Andreev
538ec1122b Added resolve modules inside inline module
#1510
2019-07-29 09:54:40 +03:00
Kirill Bulatov
b8f95f42e1 Support destructuring patterns 2019-07-29 00:33:10 +03:00
Phil Ellison
fab8e9bb8a cargo format 2019-07-28 20:54:37 +01:00
Phil Ellison
4fd7ad908b Add special case for f32 and f43 suffices on Literal.kind 2019-07-28 20:47:44 +01:00
Phil Ellison
578bc05ca4 Add issue link and trailing newline 2019-07-28 20:25:06 +01:00
Phil Ellison
fe1b1dd7d9 More direct failing test 2019-07-28 19:52:30 +01:00
Phil Ellison
8e1a14a098 Add failing test 2019-07-28 18:41:29 +01:00
Phil Ellison
67e75ca126 Rerun cargo format, to make tests pass and formatting incorrect 2019-07-28 12:45:01 +01:00
Phil Ellison
44b2642900 Remove vertical ellipses in references.cs 2019-07-28 12:37:03 +01:00
Phil Ellison
1b74eed8ca Remove vertical ellipses from tests in complete_snippet.rs and presentation.rs 2019-07-28 12:33:21 +01:00
Phil Ellison
46c07ed578 Remove vertical ellipses from tests in complete_scope.rs 2019-07-28 12:28:14 +01:00
Phil Ellison
5c4df97996 cargo format 2019-07-28 12:08:06 +01:00
Phil Ellison
9f6909c0ce Inline snapshot for test_file_structure (less clear that this one is a good idea) 2019-07-28 12:01:28 +01:00
Phil Ellison
a72331f223 Inline snapshots for all tests in runnables.rs 2019-07-28 11:57:56 +01:00
Phil Ellison
8f71614bdd Inline snapshots for all tests in references.rs 2019-07-28 11:52:17 +01:00
Phil Ellison
69244a6e18 Inline snapshots for all tests in complete_snippet, remove now-unused check_completion 2019-07-28 11:45:03 +01:00
Phil Ellison
460423e66c Inline snapshots for all tests in presentation.rs 2019-07-28 11:35:48 +01:00
Phil Ellison
eb7d1b0fee Inline snapshots for all tests in complete_scope.rs 2019-07-28 11:24:29 +01:00
Phil Ellison
164ba6092c Remove unused highlights_code_inside_macro snapshot, inline rename_mod_in_dir snapshot 2019-07-28 10:42:31 +01:00
bors[bot]
de278d1649 Merge #1599
1599: it's a good idea to build extension before installing it r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-27 20:02:26 +00:00
Aleksey Kladov
e29cbcbedd it's a good idea to build extension before installing it 2019-07-27 23:02:03 +03:00
bors[bot]
442072d746 Merge #1597
1597: Overhaul installation process r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-27 11:36:17 +00:00
Aleksey Kladov
ecb1327fed Overhaul installation process
The new commands are

$ cargo install-ra --client-code
$ cargo install-ra --server --jemalloc
2019-07-27 14:35:18 +03:00
bors[bot]
d23a755870 Merge #1596
1596: Implement inlay hints for emacs r=matklad a=flodiebold

I wanted to have the nice type hints in emacs as well 😄 

![2019-07-27-111718_982x171_scrot](https://user-images.githubusercontent.com/906069/61992560-43104700-b060-11e9-879f-8ad60f71b2e5.png)


Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
2019-07-27 09:56:30 +00:00
Florian Diebold
00c74b5d18 Implement inlay hints for emacs 2019-07-27 11:02:34 +02:00
bors[bot]
dc6f0b5a4e Merge #1594
1594: Improve inlay hinting for types r=matklad a=SomeoneToIgnore

Add hints for types in for loop expressions.
Resolve types for every tuple parameter.
Refactor the code.

![image](https://user-images.githubusercontent.com/2690773/61957524-2294ae00-afc8-11e9-8bdc-f86f9c84ab7e.png)


Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2019-07-26 20:16:19 +00:00
Kirill Bulatov
5169a9d498 Improve inlay hinting for types
Add hints for types in for loop expressions.
Resolve types for every tuple parameter.
Refactor the code.
2019-07-26 18:06:31 +03:00
bors[bot]
4647e89def Merge #1586
1586: Add type decorators r=matklad a=SomeoneToIgnore

A follow-up of https://github.com/rust-analyzer/rust-analyzer/pull/1549

Now the frontend shows inlay hints as VS Code Decorators:

<img width="666" alt="image" src="https://user-images.githubusercontent.com/2690773/61802687-918fcc80-ae39-11e9-97b0-3195ab467393.png">
<img width="893" alt="image" src="https://user-images.githubusercontent.com/2690773/61802688-93599000-ae39-11e9-8bcb-4512e22aa3ed.png">

A few notes on the implementation:
* I could not find a normal way to run and display the hints for the file that's already open in the VS Code when it starts.
The updating code runs ok, but does not actually show anything. 
Seems like I miss some event that I could add a handler to.
I've also experimented with `setTimeout` and it worked, but this is too ugly.
The hints appear now when a new file is open or when some change is done in the existing file.

* If there's a `dbg!` used in the lsp_server, the frontend starts receiving change events that contain the string from the `dbg!` output.
It should not be the case in a real life, but I've decided to cover this case, just in case.

* For bigger files, ~500 lines, the decorators start to blink, when updated, this does not seem to be very much of a problem for me at this particular stage of the feature development and can be optimized later. In the worst case, those decorators can be turned off in settings.

* Cursor movement is rather non-intuitive on the right edge of the decorator.
Seems like a thing to fix in the VS Code, not in the plugin.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2019-07-25 17:42:55 +00:00
bors[bot]
ceb16591de Merge #1591
1591: Make Analysis api cancellable r=matklad a=SomeoneToIgnore

Based on the discussion from here: https://github.com/rust-analyzer/rust-analyzer/pull/1549#discussion_r305593236

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2019-07-25 17:32:17 +00:00
Kirill Bulatov
dbbb0beb3e Make Analysis api cancellable 2019-07-25 20:22:41 +03:00
bors[bot]
a8e37ddbc8 Merge #1590
1590: Update crossbeam to pull in new memoffset r=matklad a=kjeremy

Fixes `cargo audit` complaints about memoffset being unsound.

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-07-25 16:02:45 +00:00
kjeremy
3e6d60ce8d Update crossbeam to pull in new memoffset 2019-07-25 11:57:49 -04:00
Kirill Bulatov
f1ba963a30 npm run fix 2019-07-25 16:20:02 +03:00
Kirill Bulatov
02f18abc55 Code review fixes 2019-07-25 15:43:35 +03:00
Kirill Bulatov
bd904247ba Remove unnecessary hacks 2019-07-25 15:17:28 +03:00
Kirill Bulatov
583f5c9612 Fix linter issues 2019-07-25 15:17:28 +03:00
Kirill Bulatov
f7b8ae1ee7 Simplify the hints display 2019-07-25 15:17:28 +03:00
Kirill Bulatov
169e69d217 Show type decorators 2019-07-25 15:17:28 +03:00
bors[bot]
1d68e6171e Merge #1589
1589: try to show exact prettier problem r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-25 10:06:00 +00:00
Aleksey Kladov
51568c1467 try to show exact prettier problem 2019-07-25 13:05:34 +03:00
bors[bot]
0651fdc3c8 Merge #1588
1588: ⬆️ npm deps r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-25 09:17:50 +00:00
Aleksey Kladov
38f3b47a00 ⬆️ npm deps 2019-07-25 12:17:27 +03:00
bors[bot]
0194adb651 Merge #1585
1585: move syntax tests to unit tests r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-24 09:51:25 +00:00
Aleksey Kladov
459241f272 move syntax tests to unit tests 2019-07-24 12:49:19 +03:00
Aleksey Kladov
4d544fbf9b switch back to old cleaning strategy
Turns out, Cargo is pretty bad at cleaning after itself: I see .rmeta,
.rlib and .d files after clean :(
2019-07-24 12:35:51 +03:00
bors[bot]
bf3030404e Merge #1584
1584: switch to upstream unescape r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-24 09:03:26 +00:00
Aleksey Kladov
2473cb6a5c switch to upstream unescape 2019-07-24 11:47:28 +03:00
bors[bot]
a971c6d32d Merge #1583
1583: ⬆️ rowan r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-24 08:44:40 +00:00