Commit graph

11690 commits

Author SHA1 Message Date
Aleksey Kladov
0cf8ee2dc2 Remove dead code 2020-07-23 15:57:25 +02:00
bors[bot]
83f364523f
Merge #5504
5504: Reduce visibility r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 13:13:05 +00:00
Aleksey Kladov
28adb8fe16 Reduce visibility 2020-07-23 15:07:01 +02:00
bors[bot]
bb4cb71f80
Merge #5498
5498: assists: change_return_type_to_result: clarify assist description r=matklad a=matthiaskrgr

I had a -> Option<PathBuf> fn, which I wanted to change to Result<PathBuf, _>, but despite advertising to do so, the assist did not change the result type to Result<PathBuf, _> but instead just wrapped it in a Result: <Result<Option<PathBuf>, _>.

I changed the assist description to "Wrap return type in Result" to clarify that the assist only wraps the preexisting type and does not do any actual Option-to-Result refactoring.

Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
2020-07-23 12:48:08 +00:00
bors[bot]
85532e2df3
Merge #5480
5480: Fix snippetTextEdits applying to other files r=matklad a=TimoFreiberg

Fixes #4551
`vscode.window.visibleTextEditors` only contains editors whose contents are being displayed at the moment, so the previous logic only worked if the other file for which a snippetTextEdit is being received was visible in a separate split.

I feel that this is a hacky approach, so feel free to reject it for something nicer :)

Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
2020-07-23 12:33:24 +00:00
bors[bot]
803f3613ba
Merge #5500
5500: ProblemMatcher fixes/improvements. r=matklad a=rickvanprim

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

ProblemMatcher auto detects relative/absolute paths and matches VSCode LSP's owner and source.  VSCode LSP updated to specify owner.

Co-authored-by: James Leitch <rickvanprim@gmail.com>
2020-07-23 12:02:42 +00:00
bors[bot]
37e1d1c526
Merge #5503
5503: Replace superslice with API on path to stabilization r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 11:01:29 +00:00
Aleksey Kladov
4f7a3fba59 Replace superslice with API on path to stabilization 2020-07-23 12:59:18 +02:00
bors[bot]
8a49f93793
Merge #5497
5497: Store macro invocation parameters as text instead of tt r=jonas-schievink a=lnicola

We don't want to expand macros on every source change because it can be arbitrarily slow, but the token trees can be rather large. So instead we can cache the invocation parameters (as text).

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-07-23 10:36:33 +00:00
bors[bot]
085891d885
Merge #5501
5501: minor r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 08:27:20 +00:00
Aleksey Kladov
c2d8829d56 minor 2020-07-23 10:26:56 +02:00
James Leitch
995c624f57 ProblemMatcher auto detects relative/absolute paths and matches VSCode LSP's owner and source. VSCode LSP updated to specify owner. 2020-07-22 22:34:47 -07:00
Matthias Krüger
29d3d04227 assists: change_return_type_to_result: clarify assist description
I had a -> Option<PathBuf> fn, which I wanted to change to Result<PathBuf, _>, but despite advertising to do so, the assist did not
change the result type to Result<PathBuf, _> but instead just wrapped it in a Result: <Result<Option<PathBuf>, _>.

I changed the assist description to "Wrap return type in Result" to clarify that the assist only wraps the preexisting type and does
not do any deep Option-to-Result refactoring.
2020-07-22 22:44:31 +02:00
bors[bot]
56ff9ef026
Merge #5492
5492: Use symbol tags r=matklad a=kjeremy

Currently the only spec'd tag is "deprecated".

Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-22 19:43:06 +00:00
kjeremy
7eedf19cfa Move deprecated attribute to where it is needed 2020-07-22 15:41:38 -04:00
Laurențiu Nicola
cb958cf5fe Store macro invocation parameters as text instead of tt 2020-07-22 21:50:37 +03:00
kjeremy
9a9c0e1105 Use symbol tags 2020-07-22 12:18:48 -04:00
Timo Freiberg
1b5a74ef18 Fix snippetTextEdits applying to other files
vscode.window.visibleTextEditors only contains editors whose contents
are being displayed at the moment, so the previous logic only worked if
the other file for which a snippetTextEdit is being received was visible
in a separate split.
2020-07-22 17:36:54 +02:00
bors[bot]
e72c6220cd
Merge #5488
5488: Update manual.adoc r=matklad a=Veetaha



Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-07-22 15:04:11 +00:00
bors[bot]
20b37f264f
Merge #5489
5489: Clarify initializationOptions r=matklad a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-07-22 14:56:34 +00:00
Jeremy Kolb
9c0ead30b9
Clarify initializationOptions 2020-07-22 10:05:36 -04:00
Veetaha
6faf47c8fe
Update manual.adoc 2020-07-22 16:46:19 +03:00
bors[bot]
1c7d5f513c
Merge #5481
5481: Track document versions in the server r=kjeremy a=kjeremy

This also pushes diagnostics for the correct file version on close so that when it is reopened stale diagnostics are not shown.

Closes #5452 

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-07-22 13:04:30 +00:00
Jeremy Kolb
4f4582a6ad
Update crates/rust-analyzer/src/main_loop.rs
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-22 08:59:05 -04:00
bors[bot]
dba534a103
Merge #5475
5475: Support `Trait as _` imports r=matklad a=jonas-schievink

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

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-22 12:17:51 +00:00
Jonas Schievink
dce9987436 Check that visibility upgrade path is hit 2020-07-22 14:01:50 +02:00
bors[bot]
2dd8ba2b21
Merge #5487
5487: Setup global allocator in the correct crate r=matklad a=matklad

It worked before, but was roundabout



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-22 11:44:05 +00:00
Aleksey Kladov
9ad41eb908 Setup global allocator in the correct crate
It worked before, but was roundabout
2020-07-22 13:42:53 +02:00
Aleksey Kladov
deed44a472 Remove support for jemalloc
We only used it for measuring memory usage, but now we can use glibc's
allocator for that just fine
2020-07-22 13:40:45 +02:00
bors[bot]
26932e0060
Merge #5478
5478: Replace existing visibility modifier in fix_visibility r=matklad a=TimoFreiberg

Fixes #4636

I would have liked to do something about the `// FIXME: this really should be a fix for diagnostic, rather than an assist.`, but that would take a while and there's no reason not to fix this immediately.

Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
2020-07-22 11:11:36 +00:00
bors[bot]
2e73ba1b49
Merge #5479
5479: Allow gathering memory stats on non-jemalloc Linux r=matklad a=jonas-schievink

I could also parse `/proc/$PID/statm` to get the resident set size, but decided against that for now as it isn't terribly useful.

Note that `mallinfo()` is incredibly slow for some reason, and unfortunately this will be exposed to users via the "Memory Usage" command (even worse, the opened document will show the outdated values while the server is processing). So, not very ideal, but it keeps me from recompiling r-a with different feature sets all the time.

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-22 11:00:17 +00:00
bors[bot]
8b98eaa573
Merge #5483
5483: bump crossbeam-channel r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-21 19:14:22 +00:00
kjeremy
f71ff7fc7a bump crossbeam-channel 2020-07-21 14:45:10 -04:00
kjeremy
79a3dd085c Clear diagnostics for known file version on close 2020-07-21 14:18:22 -04:00
kjeremy
97927146db Store document version and pass back to the client 2020-07-21 14:07:42 -04:00
Jonas Schievink
56c090d0d0 Allow gathering memory stats on non-jemalloc Linux 2020-07-21 19:55:54 +02:00
Timo Freiberg
3d9c123104 Replace existing visibility modifier in fix_visibility 2020-07-21 18:58:00 +02:00
bors[bot]
a3ff2751b4
Merge #5476
5476: Cleanup extact variable r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-21 16:10:29 +00:00
Aleksey Kladov
be8a7048df Cleanup extact variable 2020-07-21 18:10:03 +02:00
Jonas Schievink
c07eaf868d Support Trait as _ imports 2020-07-21 17:55:17 +02:00
Aleksey Kladov
3bb1b3070a minor 2020-07-21 17:50:19 +02:00
Aleksey Kladov
65b89b5471
Merge pull request #5447 from jethrogb/gitattributes
Update .gitattributes
2020-07-21 13:32:01 +02:00
bors[bot]
9307c7f363
Merge #5472
5472: Replace insta with expect r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-07-21 10:36:04 +00:00
Laurențiu Nicola
daab8b2fd0 Remove insta dep 2020-07-21 13:11:51 +03:00
Laurențiu Nicola
f7e4b99d15 Replace remaining insta uses 2020-07-21 13:11:46 +03:00
bors[bot]
9518e2f9d6
Merge #5451 #5463 #5465 #5466
5451: Highlight more cases of SyntaxKind when it is a punctuation r=matklad a=GrayJack

This maybe closes #5406
Closes  #5453

Separate what one expect to be a punctuation semantic token (like `,`, `;`, `(`, etc), and what is not (`&`, `::`, `+`, etc)

5463: Bump lexer r=matklad a=kjeremy

Since we're now on rust 1.45

5465: Bump chalk r=matklad a=kjeremy



5466: Do not show default types in function and closure return values r=matklad a=SomeoneToIgnore

Avoid things like 
<img width="522" alt="image" src="https://user-images.githubusercontent.com/2690773/87985936-1bbe4f80-cae5-11ea-9b8a-5383d896c296.png">


Co-authored-by: GrayJack <gr41.j4ck@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-07-21 09:57:46 +00:00
bors[bot]
818aeb8a24
Merge #5467
5467: Allow null or empty values for configuration r=matklad a=kjeremy

Allow the client to respond to `workspace/configuration` with `null` values. This is allowed per the spec if the client doesn't know about the configuration we've requested.

This also protects against `null` or `{}` during initialize. I'm not sure if we want to interpret `{}` as "don't change anything" but I think that's a reasonable approach to take.

This should help with LSP clients working out of the box.

Fixes #5464 

Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-21 09:41:54 +00:00
bors[bot]
2ad5bf8d17
Merge #5471
5471: Typo r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-21 08:50:47 +00:00
Aleksey Kladov
8f3fdf3315 Typo 2020-07-21 10:50:24 +02:00
bors[bot]
99b8140d91
Merge #5470
5470: Propagate cargo.target to checkOnSave r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-21 08:31:27 +00:00