-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Vscode-like theme #2848
Comments
You mean programmatically? Very curious if that could be done. Textmate grammars have a ton of scopes, so you'd have to map those over to the much more limited set that Prism has... an interesting idea for sure. |
You might want to check out Prism themes. We offer a few additional themes over there.
VSCode themes are a lot more granular than Prism themes. An automatic tool would have to create a mapping from Textmate scopes to Prism token types to convert themes. This is going to be very difficult because:
It's going to take a lot of effort to create and maintain an automatic tool. Frankly, I don't think it's worth it. |
I don't know about the "maintain" part... aren't TM scopes mostly static these days? If someone covered the top 20-30 scopes and figured our reasonable mappings... :-) I'd personally certainly love to see someone try. |
I suppose they are but the languages themselves also change which may introduce new scopes.
Maybe that's possible? I looked at a few VSCode themes and apart from basic stuff (e.g. comments, strings), all the scope (selectors?) looked pretty complex to me. A lot of them are also language-specific.
I'd also love to see someone try (but not me). But before that, Prism should document its token types. Right now, token types are implementation details. We don't guarantee any specific token type for any language/language construct. I opened an issue for this. We will probably also need more granular token types (e.g. types for dates, doc comments/strings, character literals). |
See "Naming Conventions" https://macromates.com/manual/en/language_grammars does this no longer hold at all? I thought the whole point of scopes was that they start general and get more precise... so you wouldn't have to worry if something was a
Oh? Now if all they are doing is
Yeah, not me either, LOL. 😛 Although spending a little time thinking it thru might help with the larger "more granular token types"... I always got the impression a lot of thought has been put into the TextMate scopes... |
That is what I want. I was looking for VSCode dark+ theme in that link. Maybe those themes should also exists somewhere in the main site. Seems you found idea of automatic transformation interesting. I would like to help, but I know literally nothing about purism token types and TextMate (even it's name, before this issue). So whenever you come to a conclusion, please close the issue because it is already somehow solved with two vscode default themes in that link. |
@HKalbasi That's planned. |
Motivation
Vscode is a popular editor and it's syntax highlighting theme is familiar for many developers.
Description
A theme that follow vscode colors in syntax highlighting. Something like the one used here https://os.phil-opp.com/freestanding-rust-binary/
Maybe we can reuse theme data from vscode and generate a purism theme from each vscode theme mechanically.
Alternatives
Simply not to have it. It is completely unnecessary.
The text was updated successfully, but these errors were encountered: