Commit graph

1121 commits

Author SHA1 Message Date
Lukas Wirth
91ff47ef6a Update vscode README with a small features list 2021-03-01 11:08:26 +01:00
kjeremy
c3ab200114 Update our vscode npm packages 2021-02-23 11:39:19 -05:00
Laurențiu Nicola
23a8fc5284 Try to detect musl distros in the Code extension 2021-02-20 18:44:28 +02:00
kjeremy
a403be6456 Remove Semantic Tokens flicker workaround
https://github.com/microsoft/vscode-languageserver-node/issues/576 has been closed with
the latest vscode-languageclient release.
2021-02-16 16:27:30 -05:00
kjeremy
13008c4d30 vscode-languageclient 7.1.0-next.2 2021-02-16 16:23:37 -05:00
kjeremy
338c08f13e Use npm 7.x package-lock.json 2021-02-16 15:48:27 -05:00
Jeremy Kolb
8105418b25 Start LSP 3.17 support 2021-02-14 14:51:29 -05:00
bors[bot]
d50a37d3aa
Merge #7643 #7663
7643: Automatically detect the rustc-src directory (fixes #3517) r=matklad a=bnjbvr

If the configured rustcSource was not set, then try to automatically
detect a source for the sysroot rustc directory.

I wasn't sure how to do it in the case of the project.json file, though.

7663: Tolerate spaces in nix binary patching r=matklad a=CertainLach

If path to original file contains space (I.e on code insiders, where
default data directory is ~/Code - Insiders/), then there is syntax
error evaluating src arg.

Instead pass path as str, and coerce to path back in nix expression

Co-authored-by: Benjamin Bouvier <public@benj.me>
Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
2021-02-14 15:42:07 +00:00
Yaroslav Bolyukin
471795b019
fix: tolerate spaces in nix binary patching
If path to original file contains space (I.e on code insiders, where
default data directory is ~/Code - Insiders/), then there is syntax
error evaluating src arg.

Instead pass path as str, and coerce to path back in nix expression

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
2021-02-13 23:11:00 +03:00
Benjamin Bouvier
4a6e602c94 Allow automatically detect the rustc-src directory (fixes #3517).
If the configured rustcSource is set to "discover", try to automatically
detect a source from the sysroot rustc directory.
2021-02-13 18:20:46 +01:00
bors[bot]
82a1b91f20
Merge #7625
7625: Add **Copy Run Command Line** command for vscode r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-02-10 11:38:56 +00:00
Aleksey Kladov
97166e2ad9 Add **Copy Run Command Line** command for vscode
This is useful when you want to, e.g., run a specific test in a terminal
with `--release`.
2021-02-10 14:37:27 +03:00
bors[bot]
ff5ef2830c
Merge #7591 #7622
7591: Fix/no floating promises r=matklad a=sahandevs

closes #3515

- added `@typescript-eslint/no-floating-promises: error` rule
- changed `"no-console": ["error"]` to `"no-console": ["error", { allow: ["warn", "error"] }]` (we at least log the error messages of the floating promises)
- fixed lint/compile errors

7622: Resolve TupleStructPat in SourceAnalyzer::resolve_path r=Veykril a=Veykril

Closes #7594
bors r+

Co-authored-by: Sahandevs <sahandevs@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-02-10 08:44:53 +00:00
Aleksey Kladov
0f324bac6b Fix highlighting of injected attributes 2021-02-09 17:41:12 +03:00
Sahandevs
91dd61b9a6 use await instead 2021-02-09 17:42:46 +03:30
Sahandevs
2f82a84d2a fix errors 2021-02-07 22:06:16 +03:30
Sahandevs
3a0234d60f format 2021-02-07 21:59:06 +03:30
Sahandevs
1bb4e973ff handle Thenable type rejects 2021-02-07 21:52:32 +03:30
Sahandevs
1d0e93b58e handle promise catches 2021-02-07 21:27:21 +03:30
Sahandevs
eb69f67ab7 add no-floating-promises rule 2021-02-07 21:18:15 +03:30
Sahandevs
06c02021a3 remove unnecessary 2021-02-07 21:15:13 +03:30
Lukas Wirth
fb2b1f5ea6 Fix resolveCodeAction trying to edit files before creating them 2021-02-05 21:33:37 +01:00
Edwin Cheng
35310f1032 Update vscode for new status 2021-01-29 01:04:14 +08:00
Aleksey Kladov
2870e70163 Add config option to ignore directories 2021-01-26 16:45:54 +03:00
Aleksey Kladov
c04b561e7e Remove the need to manually sync config in package.json 2021-01-26 16:22:24 +03:00
Laurențiu Nicola
03a1da9d46 Simplify file download code 2021-01-25 19:12:54 +02:00
bors[bot]
83231dd987
Merge #7409 #7421
7409: Add References CodeLens. r=matklad a=vsrs

Closes #5836

7421: Fix RA_LOG example in dev docs r=lnicola a=lnicola

bors r+

Co-authored-by: vsrs <vit@conrlab.com>
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-25 11:18:58 +00:00
Laurențiu Nicola
5bd84716ed Code: reduce progress notification spam 2021-01-25 10:05:38 +02:00
vsrs
3618c4e0d3 Add References code lens.
For Struct, Enum, Union and Trait symbols.
2021-01-23 16:56:20 +03:00
Laurențiu Nicola
a19728604f Download aarch64-unknown-linux-gnu from GitHub 2021-01-17 16:35:57 +02:00
Laurențiu Nicola
1749a78ada Fix server path comparison 2021-01-14 15:38:57 +02:00
bors[bot]
aa9bef0797
Merge #7194
7194: Don't update the server if managed by the user r=matklad a=lnicola

Fixes #7187

CC @figsoda

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-07 14:39:50 +00:00
Laurențiu Nicola
c547ec1cd6 Don't update the server if managed by the user 2021-01-07 16:37:08 +02:00
Aleksey Kladov
037caec62c Use american spelling for config
As per

171c3c08fe/docs/dev/style.md (variable-naming)

Also implement config aliasing, for pain-free settings migrations in the future
2021-01-07 15:07:19 +03:00
Aleksey Kladov
f7a15b5cd1 More maintainable config
Rather than eagerly converting JSON, we losslessly keep it as is, and
change the shape of user-submitted data at the last moment.

This also allows us to remove a bunch of wrong Defaults
2021-01-06 15:39:28 +03:00
Aleksey Kladov
01a5b83562 Rename extension config 2021-01-04 18:41:24 +03:00
Laurențiu Nicola
9decc4c0a3 Allow download of aarch64-pc-windows-msvc binaries 2021-01-04 16:32:46 +02:00
bors[bot]
1cc73d60bb
Merge #7068
7068: Add VSCode command to view the hir of a function body r=theotherphil a=theotherphil

Will fix https://github.com/rust-analyzer/rust-analyzer/issues/7061. Very rough initial version just to work out where I needed to wire everything up.

@matklad would you be happy merging a hir visualiser of some kind? If so, do you have any thoughts on what you'd like it show, and how?

I've spent very little time on this thus far, so I'm fine with throwing away the contents of this PR, but I want to avoid taking the time to make this more polished/interactive/useful only to discover that no-one else has any interest in this functionality.

![image](https://user-images.githubusercontent.com/1974256/103236081-bb58f700-493b-11eb-9d12-55ae1b870f8f.png)


Co-authored-by: Phil Ellison <phil.j.ellison@gmail.com>
2021-01-03 09:03:15 +00:00
Phil Ellison
609a069757 Remove some unnecessary code copied from the Syntax Tree command 2021-01-01 19:35:10 +00:00
lf-
f7f6ac3554 Add an option for extra env vars in the Code extension 2020-12-30 04:51:07 -08:00
Lukas Wirth
689898e4f6 Apply text edits manually in vscode client 2020-12-29 15:43:17 +01:00
Phil Ellison
077592a12f Initial implementation of view-hir command 2020-12-28 18:29:58 +00:00
bors[bot]
94f661c62a
Merge #7001
7001: Add support for downloading aarch64-apple-darwin binaries r=matklad a=lnicola

There's also a slight behavior change here: we no longer download our 64-binaries on 32-bit Darwin and Linux. We still do that on Windows, as I don't know how to detect 32-bit Node on 64 Windows.

But some people install the 32-bit Code by mistake, I doubt 32-bit Windows is that popular in the Rust crowd.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-22 16:38:12 +00:00
bors[bot]
5506933a93
Merge #7002
7002: Extension conflict check detects more combinations r=extremegf a=extremegf

This will also detect conflicts with kalitaalexey.vscode-rust and work correctly after RA is integrated with rust-lang.rust extension.

Co-authored-by: Przemyslaw Horban <p.horban@invinets.com>
Co-authored-by: P. Horban <extremegf@gmail.com>
2020-12-22 15:23:36 +00:00
P. Horban
92b13d2fab
Fix grammar nit
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2020-12-22 16:22:33 +01:00
bors[bot]
013739c73d
Merge #6993
6993: Clean up descriptions for settings r=matklad a=rherrmann

Use two consecutive newlines (`\n\n`) to actually continue text on a
new line.

Use proper markup to reference related settings.

Consistently format references to files, command line arguments, etc.
as `code`. Format mentions of UI elements in _italic_.

Fix typos, add missing full-stops, add missing default values.

Co-authored-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
2020-12-22 15:07:36 +00:00
Przemyslaw Horban
a8b60afc2a Extension conflict check detests more combinations 2020-12-22 15:53:00 +01:00
Laurențiu Nicola
5ff576f503 Add support for downloading aarch64-apple-darwin binaries, change naming convention 2020-12-22 16:48:49 +02:00
Rüdiger Herrmann
9f070531a6 Clean up descriptions for settings
Use two consecutive newlines (`\n\n`) to actually continue text on a
new line.

Use proper markup to reference related settings.

Consistently format references to files, editor commands, command line
arguments, files, etc. as `code`.

Fix typos, add missing full-stops, add missing default values.
2020-12-22 14:51:17 +01:00
bors[bot]
b98ee075ee
Merge #6746
6746: Feature/add assist extract module to file r=matklad a=sasurau4

Fix #6522 

## Screenshot

<img src="https://user-images.githubusercontent.com/13580199/102748269-33a44300-43a5-11eb-9e37-f5fcb8e62f73.gif" width=600 />


## TODO

- [x] Remove all TODO comment
- [x] Pass the doc test



Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
2020-12-22 10:04:24 +00:00