diff options
| author | Ian Chamberlain <ichamberlain@juniper.net> | 2023-01-04 12:04:45 -0500 |
|---|---|---|
| committer | Ian Chamberlain <ichamberlain@juniper.net> | 2023-01-09 11:50:35 -0500 |
| commit | 65cf7abbe2ee75cce74592fa0af75356181566be (patch) | |
| tree | d05033bcd649cedd05dd5627e9095459b7e9d4c3 /editors/code | |
| parent | 738ce83d858aa498c3ff28be3417101ab5f9ce6f (diff) | |
| download | rust-65cf7abbe2ee75cce74592fa0af75356181566be.tar.gz rust-65cf7abbe2ee75cce74592fa0af75356181566be.zip | |
Use experimental capability to enable color codes
Diffstat (limited to 'editors/code')
| -rw-r--r-- | editors/code/package.json | 2 | ||||
| -rw-r--r-- | editors/code/src/client.ts | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 77da5e54538..930564bd7ca 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -644,7 +644,7 @@ ] }, "rust-analyzer.check.overrideCommand": { - "markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefore include `--message-format=json` or a similar option\n(for colored diagnostics, use\n`--message-format=json-diagnostic-rendered-ansi`).\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nIf there are multiple linked projects, this command is invoked for\neach of them, with the working directory being the project root\n(i.e., the folder containing the `Cargo.toml`).\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.", + "markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefore include `--message-format=json` or a similar option\n(if your client supports the `colorDiagnosticOutput` experimental\ncapability, you can use `--message-format=json-diagnostic-rendered-ansi`).\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nIf there are multiple linked projects, this command is invoked for\neach of them, with the working directory being the project root\n(i.e., the folder containing the `Cargo.toml`).\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.", "default": null, "type": [ "null", diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index c6d64ebc1ed..82cdf0390ac 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -333,6 +333,7 @@ class ExperimentalFeatures implements lc.StaticFeature { caps.codeActionGroup = true; caps.hoverActions = true; caps.serverStatusNotification = true; + caps.colorDiagnosticOutput = true; caps.commands = { commands: [ "rust-analyzer.runSingle", |
