diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-16 21:21:59 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-16 21:21:59 +0100 |
commit | 10d8cb913cb8247ae64b954cf07460f1b6d96ef7 (patch) | |
tree | 976786b86c189d8c03a15378fd62526cbe8eaab7 /editors/code | |
parent | a4cda3efbbabe4c6129de4dc095953fe858d7d3f (diff) | |
parent | 16a74cfd234e94d383b0ef067fb6a3c651ed9624 (diff) |
Merge #3958
3958: Add proc-macro related config and tests r=matklad a=edwin0cheng
This PR do the following things:
1. Add cli argument `proc-macro` for running proc-macro server.
2. Added support for proc-macro in bench and analysis-stats
3. Added typescript config for proc-macros
4. Added an heavy test for proc-macros.
To test it out:
1. run `cargo xtask install --proc-macro`
2. add `"rust-analyzer.cargo.loadOutDirsFromCheck": true"` and `"rust-analyzer.procMacro.enabled": true"` in vs code config.
[Edit] Change to use `rust-analyzer proc-macro` for running proc-macro standalone process.
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 5 | ||||
-rw-r--r-- | editors/code/src/config.ts | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 5f73c8d83..5ce59e54a 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -388,6 +388,11 @@ | |||
388 | "description": "Enable logging of VS Code extensions itself", | 388 | "description": "Enable logging of VS Code extensions itself", |
389 | "type": "boolean", | 389 | "type": "boolean", |
390 | "default": false | 390 | "default": false |
391 | }, | ||
392 | "rust-analyzer.procMacro.enabled": { | ||
393 | "description": "Enable Proc macro support, cargo.loadOutDirsFromCheck must be enabled.", | ||
394 | "type": "boolean", | ||
395 | "default": false | ||
391 | } | 396 | } |
392 | } | 397 | } |
393 | }, | 398 | }, |
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 35a05131c..3b2eec8ba 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -12,6 +12,7 @@ export class Config { | |||
12 | private readonly requiresReloadOpts = [ | 12 | private readonly requiresReloadOpts = [ |
13 | "serverPath", | 13 | "serverPath", |
14 | "cargo", | 14 | "cargo", |
15 | "procMacro", | ||
15 | "files", | 16 | "files", |
16 | "highlighting", | 17 | "highlighting", |
17 | "updates.channel", | 18 | "updates.channel", |