Closed anacierdem closed 5 years ago
In fact, current provide definition implementation finds shortest route to the target module, and do a search for the initial symbol in that file. So we basically need a mechanism to find all the implementation from a given module.
I'll write a to do list when I have the time.
Yeah, I saw it's currently using a regexp to find the implementation on the target module which is not failproof. https://github.com/anacierdem/vscode-requirejs/blob/83228a3916882bc64a636106e83eecc2edcc2499/extension.js#L223
I think it's better to parse the module source by using textmate, which is provided by Visual Studio Code. See here: https://github.com/Microsoft/vscode/issues/46281
I forked your repository, I might do some experimentation on my spare time.
@prantlf was once working on migrating the project to esprima. Don' know why gave up.
I have an idea;
Let's use vscode.executeCompletionItemProvider based on the found target module?
I'll work on this.
Not the way I've anticipated, but I've implemented a crude version.
I suggest writing some tests to cover very basic use cases for this implementation.
Reverted eval version as it may cause more issues than it resolves.
Decided to close this one as I do not need this feature and no one requested it.
Any progress on this? Would you make a checklist about what needs to be done so that others might help?