简体   繁体   English

重命名文件时,VSCode Dart/Flutter 不会重命名导入

[英]VSCode Dart/Flutter not rename import when rename the file

I'm coding Dart/Flutter in VSCode.我正在 VSCode 中编写 Dart/Flutter。

How to fix the problem where VSCode did not rename all import when I rename .dart file?如何解决重命名.dart文件时VSCode没有重命名所有导入的问题?

Is this the extensions bug or it's an unimplemented feature?这是扩展程序错误还是未实现的功能?

This is an unimplemented feature.这是一个未实现的功能。

Originally the APIs in VS Code and the Dart analysis server were not compatible (VS Code would only tell us after the file was renamed, but the Dart server needed to know before the rename to create the correct edits).最初 VS Code 中的 API 和 Dart 分析服务器不兼容(VS Code 只会在文件重命名告诉我们,但 Dart 服务器需要在重命名之前知道以创建正确的编辑)。

This has recently changed - VS Code now has APIs that allow us to hook into the rename before it happens, but it hasn't been implemented in the Dart extension yet.这最近发生了变化 - VS Code 现在具有允许我们在重命名发生之前挂钩的 API,但它尚未在 Dart 扩展中实现。

For notification when it is implemented, you can subscribe to this Dart-Code issue (otherwise, it'll be included in the release notes when it's done).对于实施时的通知,您可以订阅此 Dart-Code 问题(否则,完成后将包含在发行说明中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM