-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support for lang="ts" / TypeScript #32
Comments
TS support could be more complicated that it seems. Currently I decided to hardcode JS because there are different parts required to coordinate. |
I'm new to the Java/Kotlin/IntelliJ-plugin-ecosystem, but I'd love to help any way I can as well. |
Would love to see this generalized to lang="[any lang IDE supports]" if possible. Also happy to help. |
@sethlivingston IntelliJ doesn't work that way. You need to enable support for each and every language manually, implement coding assistance and painfully debug many integration bugs. TS is the official future of Svelte so it will be supported eventually. |
Understood. Thanks for the clarification!
…On Thu, Mar 5, 2020 at 8:57 AM Tomasz Błachut ***@***.***> wrote:
@sethlivingston <https://github.com/sethlivingston> IntelliJ doesn't work
that way. You need to enable support for each and every language manually,
implement coding assistance and painfully debug many integration bugs.
TS is the official future of Svelte so it will be supported eventually.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#32?email_source=notifications&email_token=AAEMKSP53CI4BMTYWKKPAJDRF64WFA5CNFSM4IEYKXZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN5SDLQ#issuecomment-595272110>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEMKSLKTBL7ZDT3JI5STFTRF64WFANCNFSM4IEYKXZA>
.
|
sveltejs/svelte#4518 (comment)
PS it's |
@tomblachut |
This would be so awesome. Right now, I'm forced to switch between VS Code (which supports Typescript nicely, but doesn't really work for imports and Svelte-specific things) and IntelliJ (where -thanks for this great plugin- everything works perfectly, except the Please let me know if I can help! |
It is great that there's official Svelte Language Server, it will definitely help. On the other side I just don't know how to integrate that 😅 I feel your pain given that I personally love TS. @syabro @Dan1ve is it Rough roadmap:
|
@tomblachut there is a plugin bringing LSP support into IntelliJ IDEs: https://github.com/gtache/intellij-lsp , however, AFAIK, it does not introduce any syntax highlighting features, niether any code navigation. Neverthelss, it might be helpful looking through it code, dunno |
@r00t3g there are even two, I imagine that plugin shows code for IPC between IntelliJ and node, and ofc spawning and killing that node process. Second part is I guess loading correct svelte-language-server (from package.json?) into that node instance. Folks from Svelte already implemented code navigation, right? (I didn't had a chance to checkout this new plugin) There are also classes built into IJ: Anyway probably the best way is to rip things from Vue plugin as I've always done with other code. They recently reworked that so should be best-in-class |
I'm gonna link LSP issue #98 here |
@tomblachut it appears that both |
@tomblachut my thoughts:
So from my point of view roadmap can look like:
|
@tomblachut also I am ready to implement some part of the support, but we need some decision about #100 :) |
@anstarovoyt thanks I'm gonna go through your links later, so the first thing to do would be to fork SvelteJSLanguage and SvelteJSParserDefinition, reactive labels will complicate that a bit. |
Can someone verify whether my favourite Svelte JS code (name shadowing but totally valid code):
would become
or with
|
@tomblachut do you plan to implement it in the nearest future? if not, I can try to provide an implementation sketch this week. |
@anstarovoyt I wanted to tackle reactivity first, so I think it's okay that you work on TS sketch. The only concern is whether both features will work together |
it is the reason why I call it "scratch". So we can take a look and discuss possible solutions to make it work with reactivity. |
Ok, go ahead, thanks |
Right now only JavaScript is supported in the template, see this issue for more info sveltejs/svelte#4701 |
@tomblachut |
Hi everyone! You can grab version 0.15.0 from within your IDE and use TS now. https://plugins.jetbrains.com/plugin/12375-svelte/versions/stable/99919 Feel free to open additional issues around improvements. |
@syabro This issue is about lang="ts", type checking of props will come later. Cheers! |
Oh, sorry. |
@syabro Don't worry I could've communicated it more clearly. Anyway it's better to release small increments more often if possible so here you go 😁 Depends what you want to achieve/discuss really. There are two different issues already connected to your image. #98 tackles LSP and I have no ETA on that, it will bring everything (I think) folks at sveltejs/language-tools are busy supporting (@dummdidumm mostly, thank you!) #11 is an old but still relevant issue basically about improvements to html attributes - I just updated the title and description to better reflect current status, I want to do it next, before moving codebase to 2020.3. Type checking using builtin IDE engine could come after that one. Anyway feel free to open issues if you like, that's what they are here for. |
I want to use svelte in typescript by using svelte-ts-preprocess preprocess
It would be great to add support for <script lang="ts"></script>.
Let me know if I can help you.
The text was updated successfully, but these errors were encountered: