]>
git.lizzy.rs Git - rust.git/log
vsrs [Fri, 24 Jul 2020 13:26:50 +0000 (16:26 +0300)]
Always send experimental & semantic server caps.
vsrs [Fri, 24 Jul 2020 10:17:32 +0000 (13:17 +0300)]
Code formatting
vsrs [Fri, 24 Jul 2020 07:41:50 +0000 (10:41 +0300)]
Send dynamic didSave only if the client supports
vsrs [Mon, 20 Jul 2020 19:04:59 +0000 (22:04 +0300)]
Prepare server capabilities based on client ones.
bors[bot] [Thu, 23 Jul 2020 21:49:51 +0000 (21:49 +0000)]
Merge #5511
5511: Set the document version after changes are applied but before vfs r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Thu, 23 Jul 2020 21:40:43 +0000 (17:40 -0400)]
Set the document version after changes are applied but before vfs
bors[bot] [Thu, 23 Jul 2020 20:27:22 +0000 (20:27 +0000)]
Merge #5510
5510: Lighter weight tempdir r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 23 Jul 2020 20:26:25 +0000 (22:26 +0200)]
Lighter weight tempdir
bors[bot] [Thu, 23 Jul 2020 17:32:34 +0000 (17:32 +0000)]
Merge #5508
5508: Update tracing r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Thu, 23 Jul 2020 17:31:16 +0000 (13:31 -0400)]
Update tracing
bors[bot] [Thu, 23 Jul 2020 17:06:49 +0000 (17:06 +0000)]
Merge #5507
5507: Require quotes around key-value cfg flags in rust-project.json r=matklad a=matklad
This matches rustc command-line flags, as well as the build.rs format.
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 23 Jul 2020 16:57:27 +0000 (18:57 +0200)]
Require quotes around key-value cfg flags in rust-project.json
This matches rustc command-line flags, as well as the build.rs format.
bors[bot] [Thu, 23 Jul 2020 15:23:25 +0000 (15:23 +0000)]
Merge #5506
5506: Rename modules r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 23 Jul 2020 15:23:01 +0000 (17:23 +0200)]
Rename modules
bors[bot] [Thu, 23 Jul 2020 14:55:22 +0000 (14:55 +0000)]
Merge #5505
5505: Cleanup CFG API r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 23 Jul 2020 14:22:17 +0000 (16:22 +0200)]
Cleanup CFG API
bors[bot] [Thu, 23 Jul 2020 13:58:45 +0000 (13:58 +0000)]
Merge #5473
5473: Changes to rust-project.json r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 23 Jul 2020 13:57:25 +0000 (15:57 +0200)]
Remove dead code
bors[bot] [Thu, 23 Jul 2020 13:13:05 +0000 (13:13 +0000)]
Merge #5504
5504: Reduce visibility r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 23 Jul 2020 13:07:01 +0000 (15:07 +0200)]
Reduce visibility
bors[bot] [Thu, 23 Jul 2020 12:48:08 +0000 (12:48 +0000)]
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>
bors[bot] [Thu, 23 Jul 2020 12:33:24 +0000 (12:33 +0000)]
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>
bors[bot] [Thu, 23 Jul 2020 12:02:42 +0000 (12:02 +0000)]
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>
bors[bot] [Thu, 23 Jul 2020 11:01:29 +0000 (11:01 +0000)]
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>
Aleksey Kladov [Thu, 23 Jul 2020 10:59:18 +0000 (12:59 +0200)]
Replace superslice with API on path to stabilization
bors[bot] [Thu, 23 Jul 2020 10:36:33 +0000 (10:36 +0000)]
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>
bors[bot] [Thu, 23 Jul 2020 08:27:20 +0000 (08:27 +0000)]
Merge #5501
5501: minor r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 23 Jul 2020 08:26:56 +0000 (10:26 +0200)]
minor
James Leitch [Thu, 23 Jul 2020 05:32:54 +0000 (22:32 -0700)]
ProblemMatcher auto detects relative/absolute paths and matches VSCode LSP's owner and source. VSCode LSP updated to specify owner.
Matthias Krüger [Wed, 22 Jul 2020 20:44:31 +0000 (22:44 +0200)]
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.
bors[bot] [Wed, 22 Jul 2020 19:43:06 +0000 (19:43 +0000)]
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>
kjeremy [Wed, 22 Jul 2020 19:41:38 +0000 (15:41 -0400)]
Move deprecated attribute to where it is needed
Laurențiu Nicola [Wed, 22 Jul 2020 18:50:37 +0000 (21:50 +0300)]
Store macro invocation parameters as text instead of tt
kjeremy [Wed, 22 Jul 2020 16:18:48 +0000 (12:18 -0400)]
Use symbol tags
Timo Freiberg [Tue, 21 Jul 2020 17:47:27 +0000 (19:47 +0200)]
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.
bors[bot] [Wed, 22 Jul 2020 15:04:11 +0000 (15:04 +0000)]
Merge #5488
5488: Update manual.adoc r=matklad a=Veetaha
Co-authored-by: Veetaha <veetaha2@gmail.com>
bors[bot] [Wed, 22 Jul 2020 14:56:34 +0000 (14:56 +0000)]
Merge #5489
5489: Clarify initializationOptions r=matklad a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Wed, 22 Jul 2020 14:05:36 +0000 (10:05 -0400)]
Clarify initializationOptions
Veetaha [Wed, 22 Jul 2020 13:46:19 +0000 (16:46 +0300)]
Update manual.adoc
bors[bot] [Wed, 22 Jul 2020 13:04:30 +0000 (13:04 +0000)]
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>
Jeremy Kolb [Wed, 22 Jul 2020 12:59:05 +0000 (08:59 -0400)]
Update crates/rust-analyzer/src/main_loop.rs
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors[bot] [Wed, 22 Jul 2020 12:17:51 +0000 (12:17 +0000)]
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>
Jonas Schievink [Wed, 22 Jul 2020 12:01:50 +0000 (14:01 +0200)]
Check that visibility upgrade path is hit
bors[bot] [Wed, 22 Jul 2020 11:44:05 +0000 (11:44 +0000)]
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>
Aleksey Kladov [Wed, 22 Jul 2020 11:42:53 +0000 (13:42 +0200)]
Setup global allocator in the correct crate
It worked before, but was roundabout
Aleksey Kladov [Wed, 22 Jul 2020 11:40:45 +0000 (13:40 +0200)]
Remove support for jemalloc
We only used it for measuring memory usage, but now we can use glibc's
allocator for that just fine
bors[bot] [Wed, 22 Jul 2020 11:11:36 +0000 (11:11 +0000)]
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>
bors[bot] [Wed, 22 Jul 2020 11:00:17 +0000 (11:00 +0000)]
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>
bors[bot] [Tue, 21 Jul 2020 19:14:22 +0000 (19:14 +0000)]
Merge #5483
5483: bump crossbeam-channel r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Tue, 21 Jul 2020 18:45:10 +0000 (14:45 -0400)]
bump crossbeam-channel
kjeremy [Tue, 21 Jul 2020 18:18:22 +0000 (14:18 -0400)]
Clear diagnostics for known file version on close
kjeremy [Tue, 21 Jul 2020 18:07:42 +0000 (14:07 -0400)]
Store document version and pass back to the client
Jonas Schievink [Tue, 21 Jul 2020 17:30:17 +0000 (19:30 +0200)]
Allow gathering memory stats on non-jemalloc Linux
Timo Freiberg [Sun, 12 Jul 2020 10:18:42 +0000 (12:18 +0200)]
Replace existing visibility modifier in fix_visibility
bors[bot] [Tue, 21 Jul 2020 16:10:29 +0000 (16:10 +0000)]
Merge #5476
5476: Cleanup extact variable r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 21 Jul 2020 16:10:03 +0000 (18:10 +0200)]
Cleanup extact variable
Jonas Schievink [Tue, 21 Jul 2020 15:52:43 +0000 (17:52 +0200)]
Support `Trait as _` imports
Aleksey Kladov [Tue, 21 Jul 2020 15:50:10 +0000 (17:50 +0200)]
minor
Aleksey Kladov [Tue, 21 Jul 2020 15:17:21 +0000 (17:17 +0200)]
More Rustic API for Env
Aleksey Kladov [Tue, 21 Jul 2020 15:09:56 +0000 (17:09 +0200)]
Apply suggestions from code review
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
Aleksey Kladov [Tue, 21 Jul 2020 13:43:56 +0000 (15:43 +0200)]
Document new rust-project.json format
Aleksey Kladov [Tue, 21 Jul 2020 13:12:12 +0000 (15:12 +0200)]
Replace OUT_DIR in project.json with general env
OUT_DIR doesn't make sense here, as this is a cargo-specific concept
Aleksey Kladov [Tue, 21 Jul 2020 12:57:20 +0000 (14:57 +0200)]
Replace roots with include/exclude directories
Aleksey Kladov [Tue, 21 Jul 2020 11:32:01 +0000 (13:32 +0200)]
Merge pull request #5447 from jethrogb/gitattributes
Update .gitattributes
Aleksey Kladov [Tue, 21 Jul 2020 10:52:51 +0000 (12:52 +0200)]
Expose package roots more directly
bors[bot] [Tue, 21 Jul 2020 10:36:04 +0000 (10:36 +0000)]
Merge #5472
5472: Replace insta with expect r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Tue, 21 Jul 2020 10:11:02 +0000 (13:11 +0300)]
Remove insta dep
Laurențiu Nicola [Tue, 21 Jul 2020 10:08:55 +0000 (13:08 +0300)]
Replace remaining insta uses
bors[bot] [Tue, 21 Jul 2020 09:57:46 +0000 (09:57 +0000)]
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>
bors[bot] [Tue, 21 Jul 2020 09:41:54 +0000 (09:41 +0000)]
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>
bors[bot] [Tue, 21 Jul 2020 08:50:47 +0000 (08:50 +0000)]
Merge #5471
5471: Typo r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 21 Jul 2020 08:50:24 +0000 (10:50 +0200)]
Typo
bors[bot] [Tue, 21 Jul 2020 08:31:27 +0000 (08:31 +0000)]
Merge #5470
5470: Propagate cargo.target to checkOnSave r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 21 Jul 2020 08:30:54 +0000 (10:30 +0200)]
Propagate cargo.target to checkOnSave
bors[bot] [Tue, 21 Jul 2020 07:11:55 +0000 (07:11 +0000)]
Merge #5458
5458: Use expect in some ra_hir_ty tests r=flodiebold a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
GrayJack [Tue, 21 Jul 2020 02:37:31 +0000 (23:37 -0300)]
On second thought, we want to preserve the textMate here where all punctuation that are from a Attr be highlited as Attribute
GrayJack [Tue, 21 Jul 2020 02:19:29 +0000 (23:19 -0300)]
`#` as Attribute
- Issue #5453
GrayJack [Tue, 21 Jul 2020 02:00:13 +0000 (23:00 -0300)]
@ as operator
kjeremy [Mon, 20 Jul 2020 22:11:32 +0000 (18:11 -0400)]
Protect against `{}`
kjeremy [Mon, 20 Jul 2020 21:25:48 +0000 (17:25 -0400)]
Allow 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.
Kirill Bulatov [Mon, 20 Jul 2020 20:50:41 +0000 (23:50 +0300)]
Do not show default types in closures
kjeremy [Mon, 20 Jul 2020 19:50:35 +0000 (15:50 -0400)]
Bump chalk
kjeremy [Mon, 20 Jul 2020 19:37:50 +0000 (15:37 -0400)]
Bump lexer
Laurențiu Nicola [Mon, 20 Jul 2020 19:01:09 +0000 (22:01 +0300)]
Inline lang items in coercion tests
bors[bot] [Mon, 20 Jul 2020 17:56:42 +0000 (17:56 +0000)]
Merge #5460
5460: cargo update r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Mon, 20 Jul 2020 17:53:17 +0000 (13:53 -0400)]
cargo update
bors[bot] [Mon, 20 Jul 2020 17:01:52 +0000 (17:01 +0000)]
Merge #5439 #5459
5439: cargo update r=matklad a=kjeremy
5459: Fix typo r=matklad a=matklad
bors r+
🤖
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 20 Jul 2020 16:59:46 +0000 (18:59 +0200)]
Fix typo
bors[bot] [Mon, 20 Jul 2020 16:54:57 +0000 (16:54 +0000)]
Merge #5440
5440: Minor perf tweaks per clippy r=matklad a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Laurențiu Nicola [Mon, 20 Jul 2020 16:38:52 +0000 (19:38 +0300)]
Use expect in never_type tests
Laurențiu Nicola [Mon, 20 Jul 2020 16:23:32 +0000 (19:23 +0300)]
Use expect in coercion tests
bors[bot] [Mon, 20 Jul 2020 16:13:18 +0000 (16:13 +0000)]
Merge #5457
5457: Simplify r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 20 Jul 2020 16:01:42 +0000 (18:01 +0200)]
Simplify
Aleksey Kladov [Mon, 20 Jul 2020 15:57:10 +0000 (17:57 +0200)]
Add is_workspace_member for rust-project.json
It is currently unused, but, in the future, it will be used to:
* drive certain UX (symbols search by default will look only in the
members)
* improve performance (rust-analyzer will assume that non-members
change rarely)
If not specified, is_workspace member is inferred from the path
bors[bot] [Mon, 20 Jul 2020 15:45:38 +0000 (15:45 +0000)]
Merge #5456
5456: Simplify r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 20 Jul 2020 15:44:44 +0000 (17:44 +0200)]
Simplify
GrayJack [Mon, 20 Jul 2020 15:36:23 +0000 (12:36 -0300)]
Assingment semantic highlight
GrayJack [Mon, 20 Jul 2020 14:21:40 +0000 (11:21 -0300)]
Handle semantic highlight when STAR is part of the `*{const, mut}`
GrayJack [Mon, 20 Jul 2020 12:46:50 +0000 (09:46 -0300)]
Highlight more cases of SyntaxKind when it is a punctuation
Jethro Beekman [Mon, 20 Jul 2020 10:45:05 +0000 (12:45 +0200)]
Update .gitattributes
See rust-lang/rust#57858