-
Notifications
You must be signed in to change notification settings - Fork 454
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
Support for QML #541
Comments
https://github.com/Glavin001/atom-beautify/wiki/Requesting-support-for-a-new-language Do you know where I could find more information about QML? |
https://en.wikipedia.org/wiki/QML Assuming that is the same language it looks similar to JSON, except new line characters or semicolons separate list items instead of commas. Provided the syntax is as clean and minimal as confined to those code samples and there is not grammar dependent variance an existing JSON beautifier could be modified to support this language. This is not on my agenda though. |
I would like to request this enhancement as well. The only beautifier I know of is located in QT Creator at: Tools->QML/JS->Reformat file |
It almost work in fact, I notice that ending each line with ";" give expected result with javascript model. Is there guide lines to implement / contribute a new model into prettydiff ? |
@vrince No, I have failed to write contribution documentation. I need to write this and it to the project's documentation page. I would need to write a new option for the tool so that the application specifically knows the language is QML. This would allow me to write custom extensions without massive regression into everything else. The key technical qualities to consider
I do have a question though. Look at the first example at https://en.wikipedia.org/wiki/QML#States Do you see that a block is declared to |
@prettydiff qml allow list of children (massively use in qt3d project for example) see for exemaple : http://doc.qt.io/qt-5/qt3drenderer-scene3d-animatedentity-qml.html
Note: qml allow shader / js code as string do you think this could be complex to handle ? Exemple : http://doc.qt.io/qt-5/qt3drenderer-deferred-renderer-qml-sceneeffect-qml.html |
@vrince Those strings would be something else to account for. They are multiline strings. Normally I would identify such as a parse error, because they are a parse error in JavaScript. I could extend the code to support this though. |
@vrince Could you move all further discussion to prettydiff/prettydiff#278 so that I can these technical items when I start working on this. |
would love to see this |
would also like this |
QML support is added to the 2.1.0 branch of prettydiff if you guys would like to test it out. Be sure to use the option Also, if anybody does decide to play with this would you mind providing some code samples for unit tests. I really only looked at the examples on Github, so this could be missing all kinds of support. |
Awesome thank you, will check it out!
|
Nice ! testing it today :) After a couple a runs I already can say that :
example :
ends like :
ends like :
There is also a I am running:
|
I can not reproduce the latest defects as mentioned in #541 (comment) and the latest version of Pretty Diff recently landed in Atom Beautify. |
This would be awesome.
The text was updated successfully, but these errors were encountered: