Commit graph

1042 commits

Author SHA1 Message Date
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
bors[bot]
61711d9757
Merge #6984
6984: Remove TextMate grammar r=dustypomerleau a=lnicola

Closes #6267

This is now included upstream in VS Code.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-22 04:02:28 +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
Laurențiu Nicola
133a32d446 Remove TextMate grammar
It's now included upstream in VS Code
2020-12-21 18:58:46 +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
kjeremy
d828bd794b LSP 3.16 - Released 2020-12-17 11:33:35 -05:00
Bryan Gin-ge Chen
c256eba21b
add language-configuration.json to .vscodeignore 2020-12-14 22:05:22 -05:00
Dusty Pomerleau
612be09282 add a language configuration for VS Code 2020-12-13 19:31:11 +11:00
Aleksey Kladov
2544abbf86 Make config.rs a single source of truth for configuration.
Configuration is editor-independent. For this reason, we pick
JSON-schema as the repr of the source of truth. We do specify it using
rust-macros and some quick&dirty hackery though.

The idea for syncing truth with package.json is to just do that
manually, but there's a test to check that they are actually synced.

There's CLI to print config's json schema:

    $ rust-analyzer --print-config-schema

We go with a CLI rather than LSP request/response to make it easier to
incorporate the thing into extension's static config. This is roughtly
how we put the thing in package.json.
2020-12-08 19:25:41 +03:00
bors[bot]
4d4f11925f
Merge #6706
6706: Move import text edit calculation into a completion resolve request r=matklad a=SomeoneToIgnore

Part of https://github.com/rust-analyzer/rust-analyzer/issues/6612 (presumably fixing it)
Part of https://github.com/rust-analyzer/rust-analyzer/issues/6366 (does not cover all possible resolve capabilities we can do)
Closes https://github.com/rust-analyzer/rust-analyzer/issues/6594

Further improves imports on completion performance by deferring the computations for import inserts.

To use the new mode, you have to have the experimental completions enabled and use the LSP 3.16-compliant client that reports `additionalTextEdits` in its `CompletionItemCapabilityResolveSupport` field in the client capabilities.
rust-analyzer VSCode extension does this already hence picks up the changes completely.

Performance implications are descrbed in: https://github.com/rust-analyzer/rust-analyzer/issues/6633#issuecomment-737295182

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-12-08 13:10:28 +00:00
Kirill Bulatov
cbd3717f2c Better config name 2020-12-08 14:27:18 +02: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
Kirill Bulatov
3183ff3a7b Disable the completion for no corresponding client resolve capabilities 2020-12-08 01:07:20 +02:00
kjeremy
31f50446ac Update npm packages 2020-12-07 12:29:48 -05:00
bors[bot]
ed5c1753b3
Merge #6496
6496: Use builtin scopes more r=matklad a=georgewfraser

VSCode has added more builtin fallback scopes, so we can remove some of our fallback scopes by aligning with their conventions. 

Note that the macro scope doesn't seem to actually *work* at the moment. I have filed a bug with VSCode: https://github.com/microsoft/vscode/issues/110150

Co-authored-by: George Fraser <george@fivetran.com>
2020-11-26 10:36:26 +00:00
George Fraser
ac314f88c6 Just remove the macro fallback 2020-11-25 08:41:40 -08:00
Kirill Bulatov
4c95c6e25d Gate autoimports begind experimental completions flag 2020-11-25 00:30:28 +02:00
Dusty Pomerleau
4410af455e ensure word boundary after true 2020-11-21 18:44:38 +11:00
kjeremy
1d333a8387 Use vscode-languageclient 7.0.0-next.14 2020-11-17 10:10:34 -05:00
Aleksey Kladov
4dfda64b39 Cleanup workspace loading a tiny bit 2020-11-13 17:38:26 +01:00
bors[bot]
b0ad492e3d
Merge #6519
6519: Add "Open Cargo.toml" action r=matklad a=p3achyjr

## What is it?

This adds an "open cargo.toml" action from the vscode shell, resolves #6462 

## Test

Ran ```cargo xtask install --server``` and ```cargo xtask install --client```, then ```Developer: Reload Window```.

![image](https://user-images.githubusercontent.com/8763808/98614382-2a578f00-22ad-11eb-9811-4a72a54ff6fb.png)

When clicked:

![image](https://user-images.githubusercontent.com/8763808/98618176-77d7fa00-22b5-11eb-8788-35256542f3a6.png)


Co-authored-by: Anatol Liu <axlui@anatols-mbp.lan>
2020-11-13 15:25:26 +00:00
Aleksey Kladov
75d2075665 Revert "Upgrade version of npms lockfile"
This reverts commit 3d559afc11.

VS Code uses nodejs 12 still, so its better to stick to the format it
understands.
2020-11-13 16:17:52 +01:00
Anatol Liu
b1b7727e04 add open Cargo.toml action 2020-11-12 17:48:07 -08:00
Aleksey Kladov
3d559afc11 Upgrade version of npms lockfile 2020-11-12 20:39:16 +01:00
Xavier Denis
89ce6b6664 Address review comments 2020-11-12 18:49:22 +01:00
Xavier Denis
8716087919 Add support for loading rustc private crates 2020-11-11 12:45:40 +01: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
Dusty Pomerleau
22dbbd16d8 fix: prevent /**/ from matching block doc comments 2020-11-10 09:54:00 +11: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
cynecx
fbd3d73bbc vscode: fix tmGrammar issues around non-controlflow keywords 2020-11-07 20:12:56 +01:00
George Fraser
fe435ffb27 Use builtin scopes more 2020-11-07 10:50:57 -08:00
Dusty Pomerleau
6959cb045c allow variables to terminate ranges 2020-11-07 22:08:29 +11:00
Dusty Pomerleau
ffc5f4cf2b precedence fixes:
- prevent `pat` from matching before `path` in metavariable types
- reduce the precedence of math operators so that assignment operators match correctly
2020-11-07 14:56:06 +11:00
bors[bot]
ed9f8d53bc
Merge #6488
6488: Textmate grammar: add `+=` to assignment operators r=dustypomerleau a=dustypomerleau

Fixes https://github.com/dustypomerleau/rust-syntax/issues/3.

Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
2020-11-06 22:52:13 +00:00
Dusty Pomerleau
397b76f28b add += to assignment operators 2020-11-07 09:49:08 +11: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
Dusty Pomerleau
4e66fc57bd fix: distinguish turbofish function calls from namespaces 2020-11-03 23:47:15 +11:00