-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Utilize DefinitionProvider to eliminate the need for navigating to .d.ts files #18
Conversation
Interesting, thanks for working on it! Looks very promising but it seems this case it doesn't work: https://github.com/antfu-collective/vitesse-lite/blob/e41294c41017a18ca396bc9bf33556cf2c92712e/src/components/TheFooter.vue#L3 ( Could you help to investigate a bit? Thanks! |
Thank you for responding! The issue was caused by a mismatch in the regex pattern, but it has been fixed. |
@antfu This seems promising. Any chance this is going to get merged? |
I see if it would require users to have Could you help on that? Thanks |
Let me try it 😄 |
A warning message is now displayed when users activate the extension for the first time. If users click 'OK', it will globally set |
I need this feature, how is it going? |
Sorry for the long waiting, this approach is amazing, thanks a lot! |
Description
When using the plugin, I noticed that it redirects to the
.d.ts
file first. This can be inconvenient in certain situations, such as when trying to go back to a previous location and having to pass through the.d.ts
file before returning to the original location.I am refactoring the plugin to address this issue by rewriting the DefinitionProvider to resolve the definition of auto-imported components or other modules.
It seems to be working, but there is still an unresolved issue where multiple DefinitionProviders are used for the
go to definition
feature. This results in two or more definitions being found forauto imported modules
, causing vscode to display a peek view by default. I have not found any vscode APIs that allow listening to thego to definition
click event or the display of the peek view. As a workaround, I have set"editor.gotoLocation.multipleDefinitions": "goto"
, which automatically goes to the primary definition.I have not rewritten the README.md yet due to limitations in this refactor. If this is acceptable or if there are other ways to address it, I can rewrite the README.md later.