twoslash icon indicating copy to clipboard operation
twoslash copied to clipboard

You take some Shiki, add a hint of TypeScript compiler, and 🎉 incredible static code samples

Results 65 twoslash issues
Sort by recently updated
recently updated
newest added

Generally speaking, my goal is to render the docs differently from the types. The main reason for this is: while the types tend to be the right width for the...

Loading with deasync breaks in `@11ty/[email protected]`. With the new ESM support by Eleventy the plugin could boil down to this: ```js import { setupForFile, transformAttributesToHTML } from 'remark-shiki-twoslash'; /** *...

Seems that the example has been removed. Is next.js / nextra still supported? https://github.com/shikijs/twoslash/commit/4f963b1e8be7cb3d552c271e7dc996a29f4735b7

Shiki Twoslash supports highlighting lines. For me in Eleventy (v2.0.1, eleventy-plugin-shiki-twoslash v1.1.3) this only works if I add a space after the `}`. I haven't tried other plugins, it may...

I found that the [MDX plugin](https://github.com/mdx-js/vscode-mdx/blob/a5d7c030e1120b6a8e827d028818352c7d9dc46e/package.json#L80) chose `mdx` as the language identifier. This PR updates all places where commands/providers are registered to also include mdx files. It also adds an...

Hello everyone. I'm looking for a way to configure the docusaurus plugin with a custom textmate grammar to get highlighting for languages that aren't supported out-of-the-box by Shiki. Could anyone...

Hi there 👋 I'm trying to build a documentation site with this amazing tool. However upon following the [getting started bootstrap from docusaurus](https://docusaurus.io/docs#fast-track) and the [shiki-twoslash setup for docusaurus](https://github.com/shikijs/twoslash/tree/main/packages/docusaurus-preset-shiki-twoslash#setup), and...

I was experiencing errors with de-async. IDK if this is the best way of doing it, but worked for me.

Hi, Docusaurus2 has this nice thing called ["magic comments"](https://docusaurus.io/docs/markdown-features/code-blocks#line-highlighting) that adds styling to code blocks (like line highlighting etc.) with comments. It seems that whenever I enable shiki-twoslash plugin, magic...

When rendering a `CodeBlock` in a React page the snippet has no style applied to it. Same thing when importing a markdown file with snippets inside a React page. In...