Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Add support for custom theme configurations (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschungelabenteuer committed Nov 28, 2023
1 parent 24fbbea commit dd4e8aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spicy-queens-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vitepress-plugin-shiki-twoslash": patch
---

Added support for custom theme configurations
2 changes: 1 addition & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type TwoslashConfigSettings = Prettify<
Parameters<typeof transformAttributesToHTML>[3]
>

export async function withTwoslash(config: UserConfig<DefaultTheme.Config>) {
export async function withTwoslash<ThemeConfig = DefaultTheme.Config>(config: UserConfig<ThemeConfig>) {
const { setupForFile, transformAttributesToHTML } = await import(
'remark-shiki-twoslash'
)
Expand Down

1 comment on commit dd4e8aa

@vercel
Copy link

@vercel vercel bot commented on dd4e8aa Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.