Closed
Description
Problem
For code such as:
import './a/b/c';
VS Code allows you to hover over the path and hold cmd
to look up it's definition without pressing f12. This currently is shown as:
Note that only the b
part of the path is being underlined as expected here. We would expect the entire path to be underlined since this is the symbol we are looking up
Feature Request
In order to highlight the entire path ('./a/b/c
) we need additional information on the TS Server definition
response that tells us the source range of the symbol. On possible way this could be implemented:
interface Definition extends FileSpan {
source?: FileSpan;
}
interface DefinitionResponse extends Response {
body?: Definition[];
}
This will repeat the same source
across all returned definitions. Not sure if there is a better way to add the source information to the API in a backwards compatible way