Commit Graph

748 Commits

Author SHA1 Message Date
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
Jeremy Kolb 8105418b25 Start LSP 3.17 support 2021-02-14 14:51:29 -05: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
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
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 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
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
Laurențiu Nicola c547ec1cd6 Don't update the server if managed by the user 2021-01-07 16:37:08 +02: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
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
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
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
Laurențiu Nicola 211551646f Don't download x64 binaries on non-Mac arm64 2020-12-21 21:40:01 +02:00
Son 6089c6b1ea Allow code extension to download binary in apple arm 2020-12-22 06:23:50 +11:00
Laurențiu Nicola 1da99a79d9 Remove outdated FIXME 2020-12-21 20:36:58 +02:00
Laurențiu Nicola ee73466830 Use /etc/os-release to check for NixOS
The motivation in #5641 isn't too strong, but /etc/os-release exists on
pretty much every Linux distro, while /etc/nixos sounds like an
implementation detail.
2020-12-21 19:21:43 +02:00
Daiki Ihara 23ed33a3a6 Use workspace applyEdit instead of snippetWorkspaceEdit 2020-12-21 15:55:40 +09:00
Przemyslaw Horban 689ebb98be Fixed formatting 2020-12-18 18:47:03 +01:00
Przemyslaw Horban 1152e27520 Added a warning if conflicting rust-lang.rust is enabled. 2020-12-18 18:39:51 +01:00
Kafji e65cd07e48 Remove workaround & fix fetch$1 is not a function
Remove workaround for https://github.com/rollup/plugins/issues/491
because it's fixed in 15.0
https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md#v1500.

Also fix fetch$1 is not a function error
https://github.com/rust-analyzer/rust-analyzer/issues/6757.
2020-12-08 13:06:36 +07:00
kjeremy 1d333a8387 Use vscode-languageclient 7.0.0-next.14 2020-11-17 10:10:34 -05:00
Anatol Liu b1b7727e04 add open Cargo.toml action 2020-11-12 17:48:07 -08:00
Aleksey Kladov 7d2eb000b0 Switch to upstream protocol for resolving code action
Note that we have to maintain custom implementation on the client
side: I don't see how to marry bulitin resolve support with groups and
snippets.
2020-11-10 18:48:46 +01:00
bors[bot] 2d3b0571bb Merge #6465
6465: Support multiple file edits in AssistBuilder r=matklad a=Veykril

Fixes #6459

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-09 11:54:42 +00:00
Charles Pierce d2bf2ebe15 Restore semantic token flickering workaround removed in #5697 2020-11-04 10:26:58 -08:00
Lukas Wirth be00b6b8fa Support multiple workspace edits 2020-11-04 15:04:28 +01:00
kjeremy 77ffe137f2 Smaller inlay hints
This makes things a lot more readable but isn't officially supported by vscode: https://github.com/Microsoft/vscode/issues/9078

Inspired by Visual Studio, IntelliJ and Resharper.
2020-10-28 09:52:23 -04:00
Laurențiu Nicola 91b4dd63b0 Also set textDecoration: none on inlay hints 2020-10-28 13:49:38 +02:00
Laurențiu Nicola 8a5a5b2477 Set font-wieght: normal on inlay hints 2020-10-27 09:18:25 +02:00