-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Go to definition on Svelte component from ts file takes you to SvelteComponentDev interface #342
Comments
I don't know if this is possible. We currently don't provide any language feature on js/ts files. And the go to the definition is done by the typescript language feature of vscode. I don't know if there is any way to inject into their result. |
Alternatively, anyone who wanted to quickly jump to the svelte file from any file. Use Ctrl+P to search the file. |
I suppossed it wasn't going to be so easy to handle .ts files, just wanted to leave it here in case anybody finds out how to handle it. BTW, great job, the plugin is marvellous! |
Initially support - rename (doesn't work properly for all kinds of renames yet; need to filter out references inside generated code) - diagnostics - find references (need to filter out references inside generated code) This makes all files TSX hardcoded for now, it seems the TS server is okay with importing tsx into js sveltejs#580 sveltejs#550 sveltejs#342 sveltejs#110
There exists a TypeScript plugin now which comes packaged with the VS Code extension and which you need to enable through the settings. It also is available standalone as a npm package if you need to use it outside of VS Code. |
I have it enabled in the settings and even added the standalone npm package as a plugin, but I still have the issue. |
Describe the bug
When you ctrl-click or right-click - Go to definition on a Svelte Component from a ts file you are taken to source code of the SvelteComponentDev Interface
To Reproduce
Create a new ts project:
npx degit sveltejs/template svelte-typescript-app cd svelte-typescript-app node scripts/setupTypeScript.js
Open vscode
Open main.ts
in the
import App from './App.svelte';
line, ctrlk-click onApp
or on./App.svelte
Expected behavior
Take you to the App.Svelte file, like what happens when you do it from a .svelte file
Screenshots
System (please complete the following information):
The text was updated successfully, but these errors were encountered: