-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Use shiki-twoslash for .svelte code blocks #649
Comments
Right, I never followed up on this. At some point, the POC became overly complicated when new stuff was added to the kit docs. The biggest issue is supporting the |
I assumed this was working when I saw the hover tooltips on variables for the new svelte site https://svelte.dev/docs/svelte/$state . I think I misunderstood since those blocks were JS only. Svelte blocks still don't have them. |
Yeah. the library only works with ts/js so there isn't hover info in the svelte file. There is now a twoslash vue and eslint so maybe there would be more stuff added to the base library making it easier and not needing so many layers of source map. |
I've made some efforts to build
If this is something that you think will be valueable to the docs I will gladly submit a PR to add twoslash to |
@Hugos68 I have been patiently waiting for someone to build a Svelte integration for this for quite some time. This is incredible and will benefit not only the svelte.dev site but the entire ecosystem of Svelte libraries 💪 incredible job! |
This would be incredible, thank you! |
Sure thing, once |
Describe the problem
We just upgraded the docs to use shiki-twoslash, which provides tooltips on
js
code blocks:It would be cool if
svelte
blocks got the same treatment.Describe the proposed solution
Honestly no idea, but @jasonlyu123 got a POC working previously: sveltejs/kit#3324 (comment)
Alternatives considered
No response
Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: