sveltejs / sveltejs/svelte.dev

Use shiki-twoslash for .svelte code blocks

Open
#649 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs (functionality)
Dominant language
Svelte
Stars
330
Forks
278
Avg merge
2d 2h
Merged PRs (30d)
29

Description

Describe the problem

We just upgraded the docs to use shiki-twoslash, which provides tooltips on js code blocks:

image

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: https://github.com/sveltejs/kit/issues/3324#issuecomment-1024850076

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how the docs use shiki-twoslash for JavaScript code blocks and the proof of concept linked in the related issue comment. Determine how Svelte code blocks could receive equivalent tooltip behavior. Done means Svelte blocks provide the same treatment without regressing existing code highlighting.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.