-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
When import .vue file Ctrl + Click can not jump to the definition #2052
Comments
I see a similar issue in neovim after upgrading to 1.x but it affects more: Filetypes (using take-over mode): typescript, js and vue Methods: Hover, goto definition, code actions. Neovim gives me:
|
I'm getting the same with neovim. |
I am having the same issue. Here's what the Vue Semantic Server is logging. I'm not sure if its related tho - c:/Users/Administrator/.vscode/extensions/ms-vscode.vscode-typescript-next-5.0.20221103/node_modules/typescript/lib/lib.dom.d.ts
size: 816717
ref counts: "2|5|true|1|false|undefined|undefined|j:/outliant/sunrise/dashboard|{@/*: [./src/*]}|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|2|undefined|j:/,)" And here's my jsconfig {
"compilerOptions": {
"baseUrl": ".",
"module": "es6",
"target": "es6",
"jsx": "preserve",
"paths": {
"@/*": ["./src/*"]
}
},
"exclude": ["node_modules", "dist"],
"vueCompilerOptions": {
"target": 2.7,
"jsx": "preserve"
}
} |
@CheIIau could you try can this problem reproduce in https://github.com/johnsoncodehk/volar-starter? |
@johnsoncodehk hm, on volar-starter repository it seems to work properly. then i don't understand why it doesn't work in my project. i noticed that if you import file using path like '../../bar.vue' you can jump to the definition and everything works. but if you import your vue file using ts alias like 'src/components/bar.vue' it doesn't work. but again everything workes in my project on volar v0.40.13 and older versions. can't tell exactly why is it happening. please, write if you need more info my ts config:
|
i noticed that problem occurs in quasar projects, even in a just created one (default and clean). i created them with quasar cli. in default vue project everything works fine. it seems to be some kind of conflict between quasar and volar, idk. but it's strange that everything works properly on v0.40.13 and below. |
Unfortunately I can't reproduce the problem even use your tsconfig, what's your OS? If you can provide minimal reproduction or create a test case to https://github.com/johnsoncodehk/volar/tree/master/vue-language-tools/vue-test-workspace/find-definition it will be very helpful. |
i tried it on windows 11 and 7 |
I fixed a bug that most likely caused this issue, please let me know if it still doesn't work in the next version. |
No, I still facing the bug. I noticed that it only happens if you use "export default defineComponent({})", not script setup. With script setup all seems to be fine. And the problem even appears for me in your volar-starter project, when i changed script setup to usual script with export default defineComponent in HelloWorld component. I didn't notice this before because I didn't think it could be the case and didn't try to change it for export default. |
Facing the exact same issue in a Vue 2.7 project. @johnsoncodehk please re-open. |
got same error Volar 1.2.0 with vue: ^3.2.45 |
This issue is obsolete, if it reappears it is probably for a different reason, please open a new issue and provide a repro case. |
#4063 can be a solution. |
When import .vue file, Ctrl + Click can not jump to the definition anymore, and the path intellisense can not find .vue file too.
Howerver, it works in v0.40.13 and before.
behavior in v0.40.13:
behavior after v0.40.13:
Actually, there was an issue similar to this before
#435
The problem seems to be back
The text was updated successfully, but these errors were encountered: