-
-
Notifications
You must be signed in to change notification settings - Fork 202
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) TypeScript plugin #978
Conversation
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. It's indeed a joy to see the svelte files show up in the ts language features. I listed some minor issues. Another feature I think can be decorated is getImplementationAtPosition
. It's mostly the same as getDefinition
. Should be easy to add.
When does |
https://code.visualstudio.com/docs/editor/editingevolved#_go-to-implementation |
Initially support
This makes all files TSX hardcoded for now, it seems the TS server is okay with importing tsx into js.
To test this, add
to the
contributes
property in the vscode extension'spackage.json
In contrast to #842 this does not set
"languages": ["svelte"]
which means TS will not take over Svelte files. The advantage is that diagnostics, rename etc within Svelte files stays in the control of the language-server, and only inside TS/JS files Svelte support is added. The drawback is that you need to save file changes to disk for Svelte files in order for the TS server to notice it.Next steps after merge:
#580
#550
#342
#110
@jasonlyu123 would be great if you could take a look 😃