fix(language-service): ignore css rename when use typescript-semanitc rename #4681
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #4677
When performing a rename, if the rename action is done on the name itself rather than on the . (dot), it triggers both the typescript-semantic and css plugins. However, if the rename is performed on the . (dot), only the css plugin's rename operation is triggered.
The typescript-semantic plugin correctly generates the modification based on the TypeScript files generated by Vue.
On the other hand, the css plugin analyzes the CSS block and extracts the range including the . for the rename operation. When we trigger the rename, the content we input does not include the ., but the target range for replacement does include it, leading to a misalignment issue.
In this case, the input needs to include the entire selector, including the .. However, triggering the rename only for the CSS part does not update the class names in the template area, so the desired effect is not achieved.