Can be useful in embedded.
"description": "A list of patterns for cargo-watch to ignore (will be passed as `--ignore`)",
"default": []
},
+ "rust-analyzer.cargo-watch.allTargets": {
+ "type": "boolean",
+ "description": "Check all targets and tests (will be passed as `--all-targets`)",
+ "default": true
+ },
"rust-analyzer.trace.server": {
"type": "string",
"scope": "window",
let args =
Server.config.cargoWatchOptions.command +
- ' --all-targets --message-format json';
+ ' --message-format json';
+ if (Server.config.cargoWatchOptions.allTargets) {
+ args += ' --all-targets';
+ }
if (Server.config.cargoWatchOptions.command.length > 0) {
// Excape the double quote string:
args += ' ' + Server.config.cargoWatchOptions.arguments;
command: string;
trace: CargoWatchTraceOptions;
ignore: string[];
+ allTargets: boolean;
}
export interface CargoFeatures {
arguments: '',
command: '',
ignore: [],
+ allTargets: true,
};
public cargoFeatures: CargoFeatures = {
noDefaultFeatures: false,
);
}
+ if (config.has('cargo-watch.allTargets')) {
+ this.cargoWatchOptions.allTargets = config.get<boolean>(
+ 'cargo-watch.allTargets',
+ true,
+ );
+ }
+
if (config.has('lruCapacity')) {
this.lruCapacity = config.get('lruCapacity') as number;
}