Problem
VirtualCode.linkedCodeMappings / Language.linkedCodeMaps (LinkedCodeMap.getLinkedOffsets) provide generated↔generated edges inside a virtual code. Several language-service features use these edges to recursively "follow the chain" from one synthesized position to another:
provideDefinition
provideReferences
provideRenameEdits
provideDocumentHighlights
@volar/typescript proxyLanguageService (TS plugin path)
Vue's @vue/language-core produces them in generateSetupExposed to link the __VLS_SetupExposed member name (foo) to its typeof foo reference, so definition / references / rename / highlights can traverse from the synthesized type member to the real <script setup> binding.
Why deprecate
The TypeScript content-mapper protocol (microsoft/typescript-go#4712) has no virtual↔virtual edge semantic. A mapper only emits flat SpanMapping tuples (virtual ↔ original). The "follow the linked chain" traversal cannot be expressed there, so ecosystems migrating to content mappers (e.g. Vue Language Tools v4) need a replacement.
This is an in-process concept that does not map to an external-process transform model.
Proposal
Deprecate linkedCodeMap / linkedCodeMappings in the next major (v3), and document a replacement path. One candidate replacement is to give synthesized alias positions explicit original mappings so they collapse into "one original → multiple virtual spans", which content mappers can represent.
Problem
VirtualCode.linkedCodeMappings/Language.linkedCodeMaps(LinkedCodeMap.getLinkedOffsets) provide generated↔generated edges inside a virtual code. Several language-service features use these edges to recursively "follow the chain" from one synthesized position to another:provideDefinitionprovideReferencesprovideRenameEditsprovideDocumentHighlights@volar/typescriptproxyLanguageService(TS plugin path)Vue's
@vue/language-coreproduces them ingenerateSetupExposedto link the__VLS_SetupExposedmember name (foo) to itstypeof fooreference, so definition / references / rename / highlights can traverse from the synthesized type member to the real<script setup>binding.Why deprecate
The TypeScript content-mapper protocol (microsoft/typescript-go#4712) has no virtual↔virtual edge semantic. A mapper only emits flat
SpanMappingtuples (virtual ↔ original). The "follow the linked chain" traversal cannot be expressed there, so ecosystems migrating to content mappers (e.g. Vue Language Tools v4) need a replacement.This is an in-process concept that does not map to an external-process transform model.
Proposal
Deprecate
linkedCodeMap/linkedCodeMappingsin the next major (v3), and document a replacement path. One candidate replacement is to give synthesized alias positions explicit original mappings so they collapse into "one original → multiple virtual spans", which content mappers can represent.