mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
fix issue.
This commit is contained in:
parent
64240a44be
commit
09ed9d0444
2 changed files with 21 additions and 14 deletions
|
@ -58,6 +58,13 @@ export function createClient(serverPath: string, cwd: string, extraEnv: Env): lc
|
|||
// 2. filter some change in here.
|
||||
// 2.1 rename from or to `mod.rs` should be special.
|
||||
// 2.2 not all folder change should be cared, only those have files with ".rs" postfix.
|
||||
let newFiles = data.files.map((file)=>{
|
||||
const isFolder = !file.oldUri.path.endsWith(".rs");
|
||||
return !isFolder ? file : {
|
||||
oldUri:vscode.Uri.file(file.oldUri.path+'/'),
|
||||
newUri:vscode.Uri.file(file.newUri.path+'/')
|
||||
}});
|
||||
data = {...data, files:newFiles};
|
||||
return next(data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue