-
Notifications
You must be signed in to change notification settings - Fork 5
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
solidity syntax highlighting for codemirror #5
Comments
got some inspiration and wonder if it makes sense to have scope highlighting in solidity. |
My opinion on scope highlighting: In general, I agree that scope highlighting is more helpful than "just" syntax highlighting. (I certainly liked how Eclipse was more helpful by having a deeper understanding of the code, before I ditched it for being resource-heavy.) I will keep scope highlighting in mind when porting the ACE Solidity highlighter over to CodeMirror, but I think it should be kept in it's own GitHub issue and should only be worked on after the syntax highlighting is done. My first hunch is that scope highlighting could turn out to be resource intensive, that's why I would strongly suggest to make it configurable, i.e. allow the user to turn it off: I believe that in order to get scope highlighting to work, we need to keep an AST representation of the source code around. (Your example uses JSLint, most likely for that.) I will try to research if there are any AST parsers which can deal with line-by-line changes, i.e. don't have to re-parse the whole file each time only one line got changed. CodeMirror's syntax highlighting works like that:
(source) If it - against my gut feeling - turns out to be light on resources, then all the better. |
sweet :-) |
@raphaelhuefner did you already do something ragrding any porting of syntax highlighting? you can see a rough preview of the editor embedded in a workshop here: Currently we just apply javascript syntax highlitghting and it kinda works because of solidity being slightly similar to javascript :-) |
@serapath Looks great! I'll get started with it in the next few days, but I doubt it will be ready before Christmas. |
total item: 49 |
@mfix22 I removed all console.log, release at codemirror-solidity 0.1.4. 😀 |
This is a cool effort - was this ever completed/if not are the outputs already usable, better than the javascript syntax highlighting? |
Hey thx :-) If you want to make a pull request to add it in, check: The thing is the integration needs an afternoon of thinking and refactoring to keep things minimal and lean and we are quite busy with our p2p search engine and the editor currently works "well enough" ...but it's not forgotten and it's of course still on our roadmap :-) |
Hey @alincode |
@mfix22 thanks for your feedback. |
@mfix22 it releases at codemirror-solidity@0.2.0, check it. |
@todo
results:
resources:
@raphaelhuefner
The text was updated successfully, but these errors were encountered: