Aleksey Kladov
dac9a4cebd
Don't spawn notify unnecessary
2020-07-10 23:45:07 +02:00
Aleksey Kladov
a1ef6cc553
Optimize VFS processing
2020-07-10 22:30:24 +02:00
Aleksey Kladov
676d2e040d
Sort cargo metadata
...
See https://github.com/rust-lang/cargo/issues/8477
We need this to prevent spurious workspace reloads
2020-07-10 22:30:24 +02:00
Aleksey Kladov
be679a02ab
Add profiling calls
2020-07-10 22:30:24 +02:00
Aleksey Kladov
86bc4d20b3
Also reload when adding new examples, tests, etc
2020-07-10 22:30:24 +02:00
Timo Freiberg
43079ba80d
Correctly generate new struct field in file containing struct def
2020-07-10 19:16:41 +02:00
Aleksey Kladov
a482eb0cd8
Better caret placement when filling match arms
2020-07-10 18:22:04 +02:00
Aleksey Kladov
3558736582
Better name
2020-07-10 17:56:55 +02:00
Aleksey Kladov
2d20c8f218
Don't add braces after struct
...
Unit structs are a thing
2020-07-10 17:42:18 +02:00
Aleksey Kladov
e4983daa5e
Better complete expression keywords
2020-07-10 17:41:43 +02:00
Aleksey Kladov
51dd06566e
Complete params in nested fns
2020-07-10 16:29:14 +02:00
Aleksey Kladov
d02aabe633
Complete parameters more aggressively
2020-07-10 16:07:12 +02:00
Aleksey Kladov
74d376763c
Refresh tests
2020-07-10 16:05:01 +02:00
bors[bot]
9ab59e2162
Merge #5293
...
5293: Automatically reload project info on Cargo.toml changes r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-10 13:35:46 +00:00
Aleksey Kladov
d0a8f6a3eb
Automatically reload project info on Cargo.toml changes
2020-07-10 15:35:15 +02:00
Aleksey Kladov
075380dd56
Look through Arc for goto type definition
2020-07-10 14:42:26 +02:00
Aleksey Kladov
cd4502fd47
Simplify tests
2020-07-10 14:39:05 +02:00
Aleksey Kladov
f4147f6a34
Dont expose ID
2020-07-10 14:11:31 +02:00
Aleksey Kladov
9c54537ecf
Rename
2020-07-10 14:09:31 +02:00
Aleksey Kladov
b85042601d
Goto type definition works for self
2020-07-10 14:08:35 +02:00
bors[bot]
5fa8f8e376
Merge #5286
...
5286: Only take first 500 syntax errors r=jonas-schievink a=yihuang
Too many syntax errors make some editor/ide slow, fix #3434 .
Co-authored-by: yihuang <yi.codeplayer@gmail.com>
2020-07-10 09:33:29 +00:00
yihuang
17ff67dd7e
Only take first 500 syntax errors
...
Too many syntax errors make some editor/ide slow, fix #3434 .
2020-07-10 17:30:57 +08:00
Aleksey Kladov
17edf50e2c
Avoid accidently stumping over config values
2020-07-10 10:07:08 +02:00
Aleksey Kladov
68706b59c9
Don't mess with cursor position when adding hashes
2020-07-09 19:21:41 +02:00
bors[bot]
1fb92d791e
Merge #5284
...
5284: Fold struct literals r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-09 16:49:44 +00:00
Aleksey Kladov
ca8969a104
Fold struct literals
2020-07-09 18:49:17 +02:00
Jonas Schievink
74aa0ab9f7
arg count mismatch: handle tuple ctors
2020-07-09 18:24:02 +02:00
bors[bot]
89c7c55995
Merge #5270
...
5270: Add argument count mismatch diagnostic r=matklad a=jonas-schievink
Closes https://github.com/rust-analyzer/rust-analyzer/issues/4025 .
This currently has one false positive on this line, where `max` is resolved to `Iterator::max` instead of `Ord::max`:
8aa10c00a4/crates/expect/src/lib.rs (L263)
(I have no idea why it thinks that `usize` is an `Iterator`)
TODO:
* [x] Tests
* [x] Improve diagnostic text for method calls
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-09 15:34:43 +00:00
Jonas Schievink
f4a9d9a00f
Address review comments
2020-07-09 17:33:49 +02:00
Aleksey Kladov
65d9966a4f
Always put config first
2020-07-09 16:12:53 +02:00
Aleksey Kladov
e075e6eef2
Move diagnostics tests to expect
2020-07-09 16:04:29 +02:00
Jonas Schievink
984b6889eb
Add tests
2020-07-09 15:52:10 +02:00
Jonas Schievink
3ce4407dcb
Fix diagnostic for method calls
2020-07-09 15:51:32 +02:00
Jonas Schievink
d04f3604d5
Correctly pluralize message
2020-07-09 15:50:53 +02:00
Jonas Schievink
73327c647d
Remove unnecessary DiagnosticSink handlers
2020-07-09 15:50:35 +02:00
Aleksey Kladov
d70f4f5da5
Add fixmes
2020-07-09 15:41:13 +02:00
Aleksey Kladov
9d0196a491
Simplify
2020-07-09 15:35:52 +02:00
Aleksey Kladov
b398519011
Cleanup diagnostic conversion code
2020-07-09 15:34:37 +02:00
Aleksey Kladov
117392e879
Remove insta from ra_ide
2020-07-09 14:33:57 +02:00
Aleksey Kladov
fb0bc941a5
Cleanup diagnostics tests
2020-07-09 14:33:03 +02:00
Aleksey Kladov
ea68a1d0c9
Reduce code duplication
2020-07-09 13:59:49 +02:00
Jonas Schievink
47d0cf201c
Don't emit diagnostic if there are type errors
2020-07-09 12:41:35 +02:00
Jonas Schievink
63ce2c7b5f
Add argument count mismatch diagnostic
2020-07-09 12:16:29 +02:00
Aleksey Kladov
4399eff2d0
Re-enable IDE features for incomplete impl blocs
2020-07-09 12:14:26 +02:00
Aleksey Kladov
8e1ebbcc13
Simplify
2020-07-09 11:47:27 +02:00
Aleksey Kladov
2aa27d612e
expect should be a dev dep
2020-07-09 10:59:41 +02:00
Aleksey Kladov
b660681a6b
Unify tests
2020-07-09 10:58:56 +02:00
Aleksey Kladov
b9aab22d56
No blank indent
2020-07-09 10:33:32 +02:00
Aleksey Kladov
c66812193e
Prettier rendering
2020-07-09 10:31:12 +02:00
Aleksey Kladov
e7c47eb7f5
Streamline
2020-07-09 10:19:37 +02:00
Aleksey Kladov
3a26752c66
Reduce API
2020-07-09 10:03:28 +02:00
Aleksey Kladov
22269c67b8
Cleanup
2020-07-09 09:56:15 +02:00
Aleksey Kladov
3ef9ef34c6
Reduce API
2020-07-09 09:42:01 +02:00
Aleksey Kladov
ed12bd2791
Rename
2020-07-09 09:39:53 +02:00
Aleksey Kladov
abbb539f97
Refactor hover tests
2020-07-09 00:10:49 +02:00
Aleksey Kladov
9ce9a4ae0d
Simplify tests
2020-07-08 23:06:15 +02:00
Aleksey Kladov
e4b4600752
better language
2020-07-08 22:47:50 +02:00
Aleksey Kladov
e8bb153b19
Add Markup type
2020-07-08 22:37:35 +02:00
Aleksey Kladov
16dcf020c4
simplify
2020-07-08 20:35:54 +02:00
Aleksey Kladov
d74a77efb1
Minimize API
2020-07-08 20:35:54 +02:00
Aleksey Kladov
7238acab78
Dead code
2020-07-08 20:35:54 +02:00
Aleksey Kladov
86aac4303f
Reduce visibility
2020-07-08 19:41:57 +02:00
Aleksey Kladov
dab7f3d2c6
Remove relative_path dependency
2020-07-08 19:32:36 +02:00
Aleksey Kladov
7ae696ba76
Remove unwanted dependency
2020-07-08 18:26:31 +02:00
Aleksey Kladov
35e4bb3506
Document failed refactor
2020-07-08 18:17:45 +02:00
kjeremy
4b7f473223
Clippy perf warnings
2020-07-08 09:45:29 -04:00
Aleksey Kladov
69b79e3a73
Replace ad hocery with science
2020-07-07 23:28:48 +02:00
Aleksey Kladov
5d2225f4bc
Fix symbol search in salsa
...
Previous solution for binning paths into disjoint directories was
simple and fast -- just a single binary search.
Unfortunatelly, it wasn't coorrect: if the ditr are
/d
/d/a
/d/c
then partitioning the file /d/b/lib.rs won't pick /d as a correct
directory.
The correct solution here is a trie, but it requires exposing path
components.
So, we use a poor man's substitution -- a *vector* of sorted paths,
such that each bucket is prefix-free
closes #5246
2020-07-07 17:38:02 +02:00
Aleksey Kladov
9effc6116f
Upstream salsa
2020-07-07 15:48:55 +02:00
bors[bot]
73e972a173
Merge #5244
...
5244: Add a command to compute memory usage statistics r=matklad a=jonas-schievink
This allows inspecting memory usage on a live rust-analyzer instance after it has been used interactively.
This will only work with `--features jemalloc`, so maybe it should print something more useful when that's not available? Right now it will just print 0 Bytes for every query.
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-07 11:00:04 +00:00
bors[bot]
0719f2824c
Merge #5247
...
5247: Modernize unqualified reference completion tests r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-07 10:52:54 +00:00
Aleksey Kladov
5b8a5bfb15
Modernize unqualified reference completion tests
2020-07-07 12:52:09 +02:00
bors[bot]
687fb031d2
Merge #5245
...
5245: Refactor AssistBuilder to manage a SourceChange r=matklad a=theduke
`AssistBuilder` now managaes a full `SourceChange` instead of a
`Vec<SourceFileEdit>`.
This prepares AssistBuilder to handle creation of new files.
Co-authored-by: Christoph Herzog <chris@theduke.at>
2020-07-07 10:25:17 +00:00
Christoph Herzog
3360118040
Refactor AssistBuilder to manage a SourceChange
...
`AssistBuilder`` now managaes a full `SourceChange` instead of a
Vec<SourceFileEdit>.
This prepares AssistBuilder to handle creation of new files.
2020-07-07 12:10:18 +02:00
Jonas Schievink
f44c4b61e1
Add a command to compute memory usage statistics
2020-07-07 12:10:14 +02:00
Aleksey Kladov
9b2847885d
cleanup
2020-07-07 11:44:16 +02:00
bors[bot]
0f5d62a3f3
Merge #5235 #5236 #5241
...
5235: Don't ping people in PRs r=matklad a=lnicola
5236: Disable ES module interop r=matklad a=lnicola
5241: Clippy perf warnings r=matklad a=kjeremy
Removes redundant clones
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-07 09:29:52 +00:00
Aleksey Kladov
4bbc385277
Switch to fully dynamically dispatched salsa
...
This improves compile times quite a bit
2020-07-07 10:14:48 +02:00
kjeremy
ebdee366b0
Clippy perf warnings
...
Removes redundant clones
2020-07-06 17:13:55 -04:00
Aleksey Kladov
23258d8436
Simplify file watcher
2020-07-06 09:28:17 +02:00
bors[bot]
8b0983e89a
Merge #5228
...
5228: Fix typo r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-05 09:24:58 +00:00
Aleksey Kladov
569504938e
Fix typo
2020-07-05 11:19:16 +02:00
Aleksey Kladov
4be73c2b7f
AbsPath
2020-07-05 11:15:35 +02:00
Aleksey Kladov
453167b492
Modernise item completion tests
2020-07-04 23:25:33 +02:00
Paul Daniel Faria
5b96d4103e
Fallback to target in cfg if not specified in project json config
2020-07-04 13:50:27 -04:00
Paul Daniel Faria
db99f2dd7e
Add optional target to crates in json project, lookup default cfgs per target when generating cfg list
2020-07-04 13:49:44 -04:00
Aleksey Kladov
943fa46395
Alight details in comkplation list
2020-07-04 19:03:58 +02:00
Aleksey Kladov
c14a3b4a20
Modernize qual path completion tests
2020-07-04 18:53:30 +02:00
Aleksey Kladov
824a24c710
Modernize snippet completion tests
2020-07-04 18:03:34 +02:00
Aleksey Kladov
3902e5574c
Add Item change to the set of benches
2020-07-04 17:04:33 +02:00
Aleksey Kladov
000d1db351
Fix bench to work with relative paths
2020-07-04 17:03:02 +02:00
Aleksey Kladov
ba9c398144
Modernize postfix completion tests
2020-07-04 15:44:21 +02:00
Aleksey Kladov
7a7fd6d239
Modernize pattern completion tests
2020-07-04 15:10:55 +02:00
Aleksey Kladov
9dacd2338c
Fix lookup in tests
2020-07-04 15:05:33 +02:00
Aleksey Kladov
216e093f90
Macro tests
2020-07-04 15:04:57 +02:00
Aleksey Kladov
03ca33406e
Modernize tests
2020-07-04 14:53:43 +02:00
Aleksey Kladov
f2f6a46aa4
Cleanup dot completiont tests
2020-07-04 10:41:50 +02:00
Aleksey Kladov
caeddff543
Comments
2020-07-04 10:03:27 +02:00
Aleksey Kladov
5c68dd6b59
Better tests for completion scoring
2020-07-04 09:53:54 +02:00
Aleksey Kladov
aaba2300fb
Modernize completion presentation tests
2020-07-04 09:36:53 +02:00