Open arstnei0 opened 1 year ago
Hi @zihan-ch , it would be really cool. Are you interested in doing this?
Of course! I can't wait for it! I'm working on it now.
I'm not quite familiar with code highlighting stuff. The actual effect isn't really as well as Aura Dark in VS Code.
Hey 😄 I noticed now that issue. I would recommend to do the porting first for CodeMirror 6 highlighting (which codeimage uses under the hood)
This allows to use the theme also outside CodeImage 😄 then the integration should be easier
Hi @zihan-ch , it looks good to me. We ended up having to deal with the styling limitations of the target, which in this case is CodeMirror.
Two important points:
In addition to direct PR in the CodeImage repository, it is important to keep the port here in our repository also using the Aura generator, you can easily convert using the CLI with the tokenize command to transform hexadecimal values into tokens.
The point mentioned by @riccardoperra is very valid, and we can take benefit from two ports (CodeImage and CodeMirror) easily.
What do you think?
In case of the CodeMirror integration, we have to deal with the dependency @lezer/language and @codemirror/language ...should we have to install them? or we have to provide only the file so anyone can copy the content through this repo? What about publishing a package on npm?
@riccardoperra the npm package solution looks great for me!
@riccardoperra it will be good to make like vscode port, where we have the npm package published and the theme files here where the Aura generator can apply the token conversion and generate the final theme files ready to publish
Ok, I'll look at it. What's the best solution in order to publish the built file in your repo?
Looking at the index.ts i was thinking to use rollup to build the package then save the output files to the "extra" folders with copyExtraFiles
. Is it ok or you prefer another approach?
@riccardoperra the copyExtraFiles is to copy files don't need any transformation to be copied as it is, the best approach to make an Aura port is using the createPort function to make the proper transformations like tokens to final values. We need that because if any color value changes in Aura color scheme, all ports will be updated easily.
You also can take a look at docs section
How about we build a theme for Codeimage?