feat: add rename symbol within <script> tags

This commit is contained in:
condichen@tencent.com
2020-12-02 00:35:10 +08:00
parent f89bb0d54a
commit 94b2772f8c
2 changed files with 21 additions and 3 deletions

View File

@@ -501,9 +501,10 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment)
const position: Position = params.position;
if (document) {
const htmlMode = languageModes.getMode('html');
if (htmlMode && htmlMode.doRename) {
return htmlMode.doRename(document, position, params.newName);
const mode = languageModes.getModeAtPosition(document, params.position);
if (mode && mode.doRename) {
return mode.doRename(document, position, params.newName);
}
}
return null;