-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Not Ready] [typespec-vscode] Rename file should rename import #5674
base: main
Are you sure you want to change the base?
[Not Ready] [typespec-vscode] Rename file should rename import #5674
Conversation
@@ -281,6 +281,34 @@ export function getPathComponents(path: string, currentDirectory = "") { | |||
return pathComponents(path, getRootLength(path)); | |||
} | |||
|
|||
export function getRelativePathByComparePaths(from: string, to: string): string { | |||
if (from.length === 0 || to.length === 0 || from === to) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the path-util is copied from vscode, we won't change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also already a get relative path above
@@ -85,6 +85,25 @@ export class TspLanguageClient { | |||
} | |||
} | |||
|
|||
async updateImportsOnFileMovedOrRenamed( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this not be done in the language server?
fixed: #2470
Compiler:
Locate the file with the modified import content and modify it
Typespec-vscode:
Add implementation code such as configuration content and user-friendly operations