shiki
shiki copied to clipboard
Consider migrating all the shiki-x projects into this monorepo
For example, the TypeScript monorepo has a gatsby plugin for using shiki and I'm sure there are more
- https://github.com/rsclarke/rehype-shiki
- https://github.com/leafac/shiki-latex
- https://github.com/EldoranDev/gridsome-plugin-remark-shiki
- https://github.com/microsoft/TypeScript-Website/tree/v2/packages/gatsby-remark-shiki-twoslash (I found it through https://fatihkalifa.com/typescript-twoslash, really beautiful rendering):
How would you go about this — just go asking them? Also I'm wondering if we should keep some packages separate, for example shiki-latex, if we have an org it can be shikijs/shiki-latex.
Yah! That site is great!
Yeah, we just ask politely - it worked really well for the svelte tooling
Thanks for the mention on the new Shiki website!
I’m happy to transfer shiki-latex to the shikijs organization!
By the way, check out this video in which I talk about Shiki a whole lot (starting on 27:41).
@leafac Thanks a lot for your video tutorial!
I'm ok for transferring, but I haven't had a chance to play with shiki-latex yet and I wouldn't have time to fix bugs for it.
@orta Do we really have to keep everything in a monorepo or we can just keep the repos under the org?
I can continue maintaining the project.
@leafac Sent you an invitation for @shikijs. Feel free to transfer it to shikijs org. I'll grant you admin access. Once I have some time I'll try to take a look of shiki-latex and see if there's anything I can help. Thanks again!
No strong opinions on monorepo or not, whatever feels like the right fot
It’s transferred: https://github.com/shikijs/shiki-latex
@leafac 👍 Made you admin
@rsclarke Would you be interested in moving https://github.com/rsclarke/rehype-shiki to a repo here or as a package in the monorepo to continue maintaining it?
@Enter-tainer I see you made a lot of changes in your branch of shiki, and https://github.com/Enter-tainer/rehype-shiki. Would you be interested in working together to bring those changes upstream, and moving rehype-shiki to here or as a separate project under shikijs?
@rsclarke Would you be interested in moving rsclarke/rehype-shiki to a repo here or as a package in the monorepo to continue maintaining it?
@Enter-tainer I see you made a lot of changes in your branch of shiki, and Enter-tainer/rehype-shiki. Would you be interested in working together to bring those changes upstream, and moving rehype-shiki to here or as a separate project under shikijs?
I am happy to bring my changes upstream. I've added semantic highlighting and more code decorations (such as italic, underline, and bold fonts) to my branch of shiki.
- Semantic code highlighting is based on the language server protocol. It only works on nodejs. And it currently only supports C++. It works by communicating with
clangd
to get semantic tokens and then colorize them. However, the implementation may not be as cool as it sounds (dirty hacks) 😀. Moreover, this feature is breaking. In my branch of shiki,highlighter.codeToThemedTokens
is a async function. As for this feature, I think more discussions are needed. - As for code decorations, I am glad to bring them upstream.
Semantic code highlighting is based on the language server protocol
Nice! I didn't realize that you implemented this. Maybe we can take a look together in implementing #68.
highlighter.codeToThemedTokens is a async function
Yeah, this will make it hard to use it in markdown-it: https://github.com/markdown-it/markdown-it/issues/40
more code decorations (such as italic, underline, and bold fonts)
Take a look at https://github.com/shikijs/shiki/pull/23#issuecomment-678286089 I'd say propose an API first before doing it. It's not that hard to implement it, but I care about having a good API.
For rehype-shiki, do you want to transfer and continue to develop it under shikijs? I can make you admin for that project.
For rehype-shiki, do you want to transfer and continue to develop it under shikijs? I can make you admin for that project.
My branch of rehype-shiki is just a fork of @rsclarke 's repo. I only make it compatible with my branch of shiki. Maybe we can learn his idea.
The rehype-shiki project isn't up to date with the latest version of Shiki and @rsclarke hasn't been active on either Twitter or GitHub since this summer. Any chance we could fork it and move it into this project anyway?
@rsclarke Would you be interested in moving https://github.com/rsclarke/rehype-shiki to a repo here or as a package in the monorepo to continue maintaining it?
Apologies for the inactivity. It's been my intention to update the project/rewrite in TypeScript, I'm happy to bring it under the shikijs name, is there a preference for rehype-shiki as package in the monorepo or an independent repository?
@rsclarke Would you mind taking a look at https://github.com/rsclarke/rehype-shiki/issues/49? Do you have enough time to maintain the library? If you are too busy, it seems @leafac and @Enter-tainer would be happy to lend a hand. No need to apologize, we all get busy sometimes.
I'll move on with the most actively maintained one for the shikijs org, though.
That’s good timing. I just released @leafac/[email protected], which adds the ability to pass multiple highlighters. I’m doing this because I need to support dark mode, but it’s a generic enough implementation that I see it being useful if want to let the user pick a theme, for example.
In any case, the bottom line is: I’m using @leafac/rehype-shiki at work, I’m committed to maintaining it, I’m willing to bring it into the shikijs organization, and I’m already an administrator on the organization, so just say the word and I’ll make it happen.
@leafac Let's move forward with your fork then. Look forward to your PR.
I’m just checking in to let y’all know that I’m still around and I’ll work on bringing everything (shiki-latex and @leafac/rehype-shiki) to the monorepo in the near future.
@leafac Any luck? Don't worry too much about making everything perfect before moving it into the org. You can still make changes as you use to do if you move it!
Oops, sorry, I know it’s been a while. I’m on it!