-
Notifications
You must be signed in to change notification settings - Fork 132
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
[Feature]: Add shiki syntax highlighting plugin support #211
Comments
Hey, any thoughts on this issue? |
Thanks for feedback. I think it's important to ensure the flexibility in code highlight solution. Currently the most difficult thing is that rspress does code highlight in runtime instead of compiled-time, in the meanwhile, shiki only supports compiled-time code highlight in most cases. So i'm going to solve the problem and add a @rspress/plugin-shiki to support shiki highlight in rspress. |
That’s great, very appreciated ! |
I will support the plugin this week and notify you after finishing it. |
Take it easy, no rush at all |
@sanyuan0704 Great, Thanks |
What problem does this feature solve?
rspress
seems to support PL syntax highlighting by prismjs at the moment, hopefully theShiki
plugin can be added as well. The advantage of supportingshiki
is that prism may can't support syntax highlighting for some less common programming languages in the short term, but if it supports theshiki
plugin, the corresponding syntax highlighting grammar can be applied toshiki
as long as it has a VSCode extension. And the Nushell official site is currently using this solution!What does the proposed API look like?
Something like this: https://vuepress.github.io/reference/plugin/shiki.html
The text was updated successfully, but these errors were encountered: