-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add more languages #8
Comments
Not my project, but it appears that this would require making more .json files for languages. Heres the one thats included:
|
Objective-C syntax and integrated themes should be moved to external (maybe .json) files. |
@altaveron I think it allready is https://github.com/Anviking/Chromatism/blob/master/Chromatism/Chromatism/test.json Or at least was attempted. |
It was attempted. I'm yet not happy with how the syntax highlighting is done, and I want to be more sure about it before possibly moving regex-patterns and themes to external files. |
I've started a possible externalisation on my fork of the project (ac3xx/Chromatism@bcd71e9) - split out the Objective-C regex into an external plist and started a CSS one (although the regex for that still has a few bugs). Any thoughts would be good. |
@ac3xx Looks amazing, will take a closer look later. However, the plists need to be in a bundle, right? |
@Anviking Yes, they will need to be, static libraries can't contain resources. The CSS highlighter has some bugs associated (bad regex mainly), but the basis is there :). To test as it is, just link the plists that are in the Lexers folder to the project you're testing with (Supporting Files). |
@ac3xx Your additions are most welcome! I'm not still convinced, but if you'd move the dynamic-plist-parsing to a cleverly named initialization-method I'm very happy to merge a PR. If you want you could call your custom initialization method from Basically I don't like plists because I think they are so annoying to edit. I was thinking about a |
@Anviking Okay, sure, I'll take a look into cleaning it up with initialisation methods/bundles/etc later this week when I get some free time. To a certain extent I agree with you (it took me a while to create that plist for Objective-C). My only argument for having plists over subclasses/dictionary representations is that it's overall regarded as more intuitive and "safe" for expandability - devs can just drop in any extra plist files they might want to use and instantly use them with a method call. |
Plists really aren't all that bad to edit in Xcode. I'd personally prefer them over subclasses (they are "drop in") However, subclasses could allow more flexibility (direct method customization rather than strings in a plist). I think this a decision that should be considered further. Sent from my iPhone
|
Then, wouldn't subclassing |
@Anviking Yeah, both would be good. :) |
How would I be able to add Java support to this library? |
@mbcoder17 There is no guide/documentation, but you look at how its done for C, ObjC and Swift. |
No description provided.
The text was updated successfully, but these errors were encountered: