Commit graph

11187 commits

Author SHA1 Message Date
vsrs
fd94a10be1
Add docs 2020-07-03 16:01:13 +03:00
vsrs
bebbfa1a29 Fix workspaceRoot 2020-07-03 14:56:30 +03:00
vsrs
611fad275f code linting 2020-07-03 14:23:51 +03:00
vsrs
271abb7bc4 Add tests 2020-07-03 14:23:51 +03:00
vsrs
7b79d24ad5 Add runnable env support. 2020-07-03 14:23:51 +03:00
bors[bot]
57576ac420
Merge #5200
5200: Refactor keyword completion tests r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-03 10:57:36 +00:00
Aleksey Kladov
e2b04621f9 Refactor keyword completion tests 2020-07-03 12:51:18 +02:00
bors[bot]
81bb3d9c1a
Merge #5199
5199: Cleanup record completion tests r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-03 09:49:12 +00:00
Aleksey Kladov
0e23175a07 Cleanup record completion tests 2020-07-03 11:48:48 +02:00
bors[bot]
4cb8bf03c5
Merge #5192
5192: Implement rust-analyzer feature configuration to tests. r=matklad a=daxpedda

Fixes #3198.

I'm unsure if it is desired this way, maybe we want to make a seperate configuration?

Co-authored-by: daxpedda <daxpedda@gmail.com>
2020-07-02 15:48:54 +00:00
bors[bot]
c80b6876d5
Merge #5193
5193: Move cargo metadata off the main loop r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-02 15:40:30 +00:00
Aleksey Kladov
6c7578bd7a Move cargo metadata off the main loop 2020-07-02 17:39:51 +02:00
daxpedda
eb75a644a1
Implement rust-analyzer feature configuration to tests. 2020-07-02 16:13:24 +02:00
bors[bot]
83f3cdca4f
Merge #5191
5191: Minor r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-02 14:10:13 +00:00
Aleksey Kladov
6a694ad047 Minor 2020-07-02 16:06:00 +02:00
bors[bot]
1a3a7f4237
Merge #5188
5188: Implement StatusBar r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-02 14:02:52 +00:00
bors[bot]
e75b4fc85e
Merge #5189
5189: Record and suggest assoc. items of traits via ImportMap r=matklad a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5115

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-02 13:55:14 +00:00
Jonas Schievink
6ee73cd334 Use SmolStr 2020-07-02 15:42:37 +02:00
Aleksey Kladov
4f26a3734e Indicate when project needs a reload 2020-07-02 15:34:12 +02:00
Aleksey Kladov
3ef7676076 Implement StatusBar 2020-07-02 15:32:14 +02:00
Jonas Schievink
361b399b6d Fix tests 2020-07-02 13:34:08 +02:00
Jonas Schievink
31f5b48817 Record and suggest trait items via ImportMap 2020-07-02 12:43:52 +02:00
bors[bot]
57ed622ec4
Merge #5089 #5161 #5184 #5185 #5186
5089: Disable auto-complete on comments r=matklad a=BGluth

Resolves #4907 by disabling any auto-completion on comments.

As flodiebold [pointed out](https://github.com/rust-analyzer/rust-analyzer/issues/4907#issuecomment-648439979), in the future we may want to support some form of auto-completion within doc comments, but for now it was suggested to just disable auto-completion on them entirely.

The implementation involves adding a new field `is_comment` to `CompletionContext` and checking if the immediate token we auto-completed on is a comment. I couldn't see a case where we need to check any of the ancestors, but let me know if this is not sufficient. I also wasn't sure if it was necessary to add a new field to this struct, but I decided it's probably the best option if we want to potentially do auto-completion on doc comments in the future.

Finally, the three tests I added should I think ideally not filter results by `CompletionKind::Keyword`, but if I want to get unfiltered results, I need access to a non-public function [get_all_completion_items](9a4d02faf9/crates/ra_ide/src/completion/test_utils.rs (L32-L39)) which I don't know if I should make public just for this.



5161: SSR: Add initial support for placeholder constraints r=matklad a=davidlattimore



5184: Always install required nightly extension if current one is not nightly r=matklad a=Veetaha

This is weird, but having switched back to stable by uninstalling the extension appears that vscode doesn't destroy the `PersistentState` and thus changing to `nightly` channel doesn't work because the last check for nightly extension was less than 1 hour ago. The simple solution is to skip this check if we know that the current extension version is not nightly.

5185: Force showing extension activation error pop-up notification r=matklad a=Veetaha

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5091

5186: fix: correct pd/ppd/tfn/tmod completion doc r=matklad a=fannheyward

a33eefa3b2/crates/ra_ide/src/completion/complete_snippet.rs (L23-L24)

Co-authored-by: BGluth <gluthb@gmail.com>
Co-authored-by: David Lattimore <dml@google.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
Co-authored-by: Heyward Fann <fannheyward@gmail.com>
2020-07-02 09:12:46 +00:00
bors[bot]
e5f8fb3e91
Merge #5180
5180: Disable optimizations for tracing-attributes r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-07-02 09:05:34 +00:00
Aleksey Kladov
4310e0ebf9 Disable npm audit
At the moment it fails with unfixable minor vuln in a dev-dependency
2020-07-02 10:50:50 +02:00
Heyward Fann
f1986be8fd fix: correct pd/ppd/tfn/tmod completion doc
a33eefa3b2/crates/ra_ide/src/completion/complete_snippet.rs (L23)
2020-07-02 11:06:00 +08:00
Veetaha
6a6ce616aa Force showing extension activation error pop-up notification 2020-07-02 05:19:02 +03:00
Veetaha
69b6f6def5 Always install required nightly extension if current one is not nightly 2020-07-02 05:05:29 +03:00
David Lattimore
83588a1c45 SSR: Use T! instead of SyntaxKind::* where possible 2020-07-02 09:19:58 +10:00
BGluth
cc77bdf59a Auto-completion no longer occurs on comments 2020-07-01 15:20:07 -06:00
BGluth
0bbd6428ad Added tests for no auto-completion on comments 2020-07-01 15:16:47 -06:00
bors[bot]
a33eefa3b2
Merge #5149
5149: Implement Chalk variable kinds r=flodiebold a=flodiebold

This means we need to keep track of the kinds (general/int/float) of variables in `Canonical`, which requires some more ceremony. (It also exposes some places where we're not really dealing with canonicalization correctly -- another thing to be cleaned up when we switch to using Chalk's types directly.)

Should fix the last remaining issue of #2534.

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
2020-07-01 18:41:06 +00:00
Florian Diebold
d5d485ef92 Implement Chalk variable kinds
This means we need to keep track of the kinds (general/int/float) of variables
in `Canonical`, which requires some more ceremony. (It also exposes some places
where we're not really dealing with canonicalization correctly -- another thing
to be cleaned up when we switch to using Chalk's types directly.)

Should fix the last remaining issue of #2534.
2020-07-01 20:40:38 +02:00
Laurențiu Nicola
ddcd98f604 Disable optimizations for tracing-attributes 2020-07-01 20:51:09 +03:00
bors[bot]
ec1d1a1b70
Merge #5179
5179: ItemTree: Lower fields despite invalid type r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5147

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-01 17:28:12 +00:00
Jonas Schievink
4ef1d533bd ItemTree: Lower fields despite invalid type 2020-07-01 19:24:39 +02:00
bors[bot]
43dfd29d8d
Merge #5174
5174: Colorize more test fixtures r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-07-01 17:20:02 +00:00
bors[bot]
ad1a0e626b
Merge #5175
5175: More memory-efficient impl collection r=matklad a=jonas-schievink

This saves roughly 90 MB in `ImplsFromDepsQuery`, which used to copy the list of all impls from libcore into *every* crate in the graph. It also stops collecting inherent impls from dependencies entirely, as those can only be located within the crate defining the self type.

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-01 17:12:06 +00:00
bors[bot]
8943c2cb97
Merge #5178
5178: Fold multiline calls r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-01 16:35:16 +00:00
Aleksey Kladov
8295dc42a0 Fold multiline calls 2020-07-01 18:27:58 +02:00
Laurențiu Nicola
dbb940fa7d Colorize more test fixtures 2020-07-01 19:05:34 +03:00
Aleksey Kladov
53e3a7aeb4 Update file structure tests 2020-07-01 17:59:44 +02:00
bors[bot]
87d24e7caa
Merge #5176
5176: Update expand macro tests r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-01 15:54:23 +00:00
Aleksey Kladov
bebbbb61a7 Update expand macro tests 2020-07-01 17:52:22 +02:00
Jonas Schievink
6bde542a39 Split CrateImplDefs in inherent and trait impls
This makes the intention of inherent vs. trait impls somewhat more
clear and also fixes (?) an issue where trait impls with an unresolved
trait were added as inherent impls instead (hence the test changes).
2020-07-01 17:15:20 +02:00
bors[bot]
14bf5bb7ee
Merge #5167
5167: Reuse Semantics instances r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-07-01 15:06:13 +00:00
bors[bot]
f565447775
Merge #5173
5173: Automatically reload project on config change r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-01 14:43:11 +00:00
Aleksey Kladov
a03cfa4926 Automatically reload project on config change 2020-07-01 16:42:14 +02:00
bors[bot]
3cf389f88b
Merge #5171
5171: Better account for project reload r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-01 14:01:36 +00:00
Aleksey Kladov
298adb27b9 Better account for project reload 2020-07-01 16:01:03 +02:00