mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Adds config option for cargo-watch --ignore
flag
This commit is contained in:
parent
e8a7a7b19a
commit
f4d50de275
4 changed files with 22 additions and 2 deletions
|
@ -93,10 +93,15 @@ export class CargoWatchProvider implements vscode.Disposable {
|
|||
args = '"' + args + '"';
|
||||
}
|
||||
|
||||
const ignoreFlags = Server.config.cargoWatchOptions.ignore.reduce(
|
||||
(flags, pattern) => [...flags, '--ignore', pattern],
|
||||
[] as string[]
|
||||
);
|
||||
|
||||
// Start the cargo watch with json message
|
||||
this.cargoProcess = child_process.spawn(
|
||||
'cargo',
|
||||
['watch', '-x', args],
|
||||
['watch', '-x', args, ...ignoreFlags],
|
||||
{
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
cwd: vscode.workspace.rootPath,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue