Open linghaoSu opened 1 month ago
I'm not entirely sure if this is the best approach, but it seems to resolve the issue effectively.
This solves another problem: renaming variables in v-bind()
does not take effect on the source definition.
However, this will make the normal CSS renaming behavior unavailable. We might need to reimplement it here.
fix https://github.com/vuejs/language-tools/issues/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.