shiki icon indicating copy to clipboard operation
shiki copied to clipboard

Consider migrating all the shiki-x projects into this monorepo

Open orta opened this issue 4 years ago • 22 comments

For example, the TypeScript monorepo has a gatsby plugin for using shiki and I'm sure there are more

orta avatar Aug 03 '20 15:08 orta

  • 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): image

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.

octref avatar Aug 04 '20 10:08 octref

Yah! That site is great!

Yeah, we just ask politely - it worked really well for the svelte tooling

orta avatar Aug 04 '20 17:08 orta

Thanks for the mention on the new Shiki website!

I’m happy to transfer shiki-latex to the shikijs organization!

leafac avatar Aug 27 '20 21:08 leafac

By the way, check out this video in which I talk about Shiki a whole lot (starting on 27:41).

leafac avatar Aug 27 '20 21:08 leafac

@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?

octref avatar Sep 13 '20 08:09 octref

I can continue maintaining the project.

leafac avatar Sep 13 '20 20:09 leafac

@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!

octref avatar Sep 14 '20 03:09 octref

No strong opinions on monorepo or not, whatever feels like the right fot

orta avatar Sep 14 '20 13:09 orta

It’s transferred: https://github.com/shikijs/shiki-latex

leafac avatar Sep 19 '20 23:09 leafac

@leafac 👍 Made you admin

octref avatar Sep 20 '20 07:09 octref

@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?

octref avatar Oct 04 '20 15:10 octref

@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.

Enter-tainer avatar Oct 05 '20 11:10 Enter-tainer

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.

octref avatar Oct 06 '20 03:10 octref

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.

Enter-tainer avatar Oct 06 '20 14:10 Enter-tainer

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?

vinkla avatar Oct 29 '20 10:10 vinkla

@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 avatar Nov 24 '20 07:11 rsclarke

@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.

octref avatar Mar 08 '21 15:03 octref

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 avatar Mar 08 '21 15:03 leafac

@leafac Let's move forward with your fork then. Look forward to your PR.

octref avatar Apr 07 '21 04:04 octref

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 avatar Jun 13 '21 18:06 leafac

@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!

octref avatar Feb 17 '22 17:02 octref

Oops, sorry, I know it’s been a while. I’m on it!

leafac avatar Feb 17 '22 18:02 leafac