fix rename feature (#86)
* fix rename feature * Update fileConfigurationManager.ts
This commit is contained in:
parent
a22270bede
commit
aef36c8345
2 changed files with 2 additions and 1 deletions
|
@ -146,6 +146,7 @@ export default class FileConfigurationManager {
|
||||||
quotePreference: config.get<'single' | 'double' | 'auto'>('preferences.quoteStyle', defaultQuote),
|
quotePreference: config.get<'single' | 'double' | 'auto'>('preferences.quoteStyle', defaultQuote),
|
||||||
allowRenameOfImportPath: true,
|
allowRenameOfImportPath: true,
|
||||||
allowTextChangesInNewFiles: true,
|
allowTextChangesInNewFiles: true,
|
||||||
|
providePrefixAndSuffixTextForRename: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ export default class TypeScriptRenameProvider implements RenameProvider {
|
||||||
for (const textSpan of spanGroup.locs) {
|
for (const textSpan of spanGroup.locs) {
|
||||||
changes[uri].push({
|
changes[uri].push({
|
||||||
range: typeConverters.Range.fromTextSpan(textSpan),
|
range: typeConverters.Range.fromTextSpan(textSpan),
|
||||||
newText: newName
|
newText: (textSpan.prefixText || '') + newName + (textSpan.suffixText || '')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue